Ticket #9059 (closed: fixed)
Simplify Logger class to not store created instances in static list
Reported by: | Martyn Gigg | Owned by: | Martyn Gigg |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | Maintenance |
Cc: | Blocked By: | ||
Blocking: | Tester: | Nick Draper |
Description (last modified by Martyn Gigg) (diff)
The Logger::get method currently creates a new Logger object & inserts this into a static list and waits for a user to call release so that it can be deleted. This is all a bit convoluted and harks back to when we used to cache Logger instances.
This is no longer the case and it would be better if the class could be constructed as normal and then let the users decide how to manage the new instances.
Change History
comment:3 Changed 7 years ago by Martyn Gigg
- Description modified (diff)
- Summary changed from Change Logger::get to return shared_ptr to Simplify Logger class to not store created instances in static list
comment:3 Changed 7 years ago by Martyn Gigg
- Status changed from assigned to inprogress
Add a performance test for the logging framework.
Refs #9059
Changeset: 0b7bcfdd54d6eb9d0b542ab89203c0bea07aeaf2
comment:4 Changed 7 years ago by Martyn Gigg
Refactor Logger to be a normal class that can be instantiated.
Refs #9059
Changeset: e970b351c4706add0bb98470ae13a5ca341bb8d7
comment:5 Changed 7 years ago by Martyn Gigg
Kernel/KernelTest builds & tests pass
Refs #9059
Changeset: 6e92fad22c8c42defeea1c2bb6d9bdc28035b7b2
comment:6 Changed 7 years ago by Martyn Gigg
Geometry/GeometryTest compiles & the tests pass.
Refs #9059
Changeset: 111e89d88a9f29e0104decbccdfed9ee0e86a43d
comment:10 Changed 7 years ago by Martyn Gigg
Remove unnecessary additional logger references.
Just use the base class one. Refs #9059
Changeset: 5f9da7811db41fdc62a5bd983042776cc3574987
comment:11 Changed 7 years ago by Martyn Gigg
DataHandling compiles
Move static loggers to cpp files and remove some unnecessary loggers Refs #9059
Changeset: 25d862996719f3f103bfb1ddfa6b79ad7d42567e
comment:12 Changed 7 years ago by Martyn Gigg
Crystal now compiles but not tests. They depend on MDEvents...
Refs #9059
Changeset: b53200102debb4a45d79641d0d9bc4f85a0df48c
comment:13 Changed 7 years ago by Martyn Gigg
comment:14 Changed 7 years ago by Martyn Gigg
comment:15 Changed 7 years ago by Martyn Gigg
comment:16 Changed 7 years ago by Martyn Gigg
comment:17 Changed 7 years ago by Martyn Gigg
comment:18 Changed 7 years ago by Martyn Gigg
comment:19 Changed 7 years ago by Martyn Gigg
comment:20 Changed 7 years ago by Martyn Gigg
comment:21 Changed 7 years ago by Martyn Gigg
comment:22 Changed 7 years ago by Martyn Gigg
comment:23 Changed 7 years ago by Martyn Gigg
comment:24 Changed 7 years ago by Martyn Gigg
comment:25 Changed 7 years ago by Martyn Gigg
comment:26 Changed 7 years ago by Martyn Gigg
comment:27 Changed 7 years ago by Martyn Gigg
comment:28 Changed 7 years ago by Martyn Gigg
Put back static Logger in IFunction1D.
Refs #9059
Changeset: 309006c73570b8e5123d2aa696fb3a3f4965977f
comment:29 Changed 7 years ago by Martyn Gigg
Merge branch 'feature/9059_refactor_logger' into develop
Conflicts:
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h Code/Mantid/Framework/DataHandling/src/SaveANSTOAscii.cpp Code/Mantid/Framework/Kernel/test/LoggerTest.h Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp
Refs #9059
Changeset: 81d17cf85ad63b459bd61c1266c8b2de29ce7a01
comment:30 Changed 7 years ago by Martyn Gigg
Put back static Logger in IFunction1D.
Refs #9059
Changeset: 309006c73570b8e5123d2aa696fb3a3f4965977f
comment:31 Changed 7 years ago by Martyn Gigg
Kill compiler warning about unused variable in LoggerTest
Refs #9059
Changeset: 402f963b2a8590377f4482ee60c851eb419a25fa
comment:32 Changed 7 years ago by Martyn Gigg
Merge remote-tracking branch 'origin/master' into feature/9059_refactor_logger
Conflicts:
Code/Mantid/Framework/MDAlgorithms/src/ConvertToMD.cpp
Refs #9059
Changeset: 0f502d36fe516c32e1400edfe73bcf3c468a2be6
comment:33 Changed 7 years ago by Martyn Gigg
Fix other logger instances after merge from master.
Refs #9059
Changeset: 8182b9cd0384964b166a6712547d7d7f2be6a6ad
comment:34 Changed 7 years ago by Martyn Gigg
Merge branch 'feature/9059_refactor_logger' into develop
Conflicts:
Code/Mantid/Framework/DataHandling/inc/MantidDataHandling/SaveANSTOAscii.h Code/Mantid/Framework/DataHandling/src/SaveANSTOAscii.cpp Code/Mantid/Framework/Kernel/test/LoggerTest.h
Refs #9059
Changeset: 246ea81dc9424e50a178aad2182b24719a0222db
comment:35 Changed 7 years ago by Martyn Gigg
Remove a missed static logger reference in an algorithm.
Refs #9059
Changeset: 5f62d6ff09417ad044e614bde0de88cab818967c
comment:36 Changed 7 years ago by Martyn Gigg
comment:37 Changed 7 years ago by Martyn Gigg
Add deprecated Logger.get for Python.
Gives users a little leeway. Refs #9059
Changeset: bc294cfaf6d4353c6727b10efdcdfaf398cf92aa
comment:38 Changed 7 years ago by Martyn Gigg
Put back initializer character for MPI build
Refs #9069
Changeset: 019c2930128cfeb5529ca1a5b6021b72172996e8
comment:39 Changed 7 years ago by Martyn Gigg
- Status changed from inprogress to verify
- Resolution set to fixed
Branch: feature/9059_refactor_logger
Tester: Check that you can still change the log level from MantidPlot and that you get the detail that you are expecting. There should be no visible change from a user perspective.
comment:40 Changed 7 years ago by Nick Draper
- Status changed from verify to verifying
- Tester set to Nick Draper
comment:41 Changed 7 years ago by Nick Draper
Log level still works well in mantid plot and is still preserved across sessions, no apparent change - works as before.
comment:42 Changed 7 years ago by Nick Draper
re #9059 merge conflict
Changeset: 859a50c9e27d873e3c5b3c1658f2c1ff22259030
comment:44 Changed 7 years ago by Martyn Gigg
comment:45 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9902