Ticket #2584 (closed: fixed)

Opened 10 years ago

Last modified 5 years ago

Logging files: allow Linux to specify log location; allow changing log file path at run time, in C and python

Reported by: Janik Zikovsky Owned by: Janik Zikovsky
Priority: major Milestone: Iteration 29
Component: Infrastructure Keywords:
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description


Change History

comment:1 Changed 10 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:2 Changed 10 years ago by Janik Zikovsky

(In [9825]) Refs #2584: Can specify alternative log file path under Linux. Logging configuration should be picked up from Mantid.user.properties better than before.

comment:3 Changed 10 years ago by Janik Zikovsky

(In [9826]) Refs #2584: Adding the use of a MANTIDLOGPATH variable to override the log file path at run-time; test.

comment:4 Changed 10 years ago by Janik Zikovsky

(In [9828]) Refs #2584: Test may fail on windows; disabled for now.

comment:5 Changed 10 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

(In [9838]) Fixes #2584: Test should work on Windows since it puts the log file in the user's home area.

comment:6 Changed 10 years ago by Janik Zikovsky

(In [9842]) Refs #2584: Close logging file should help test on windows?

comment:7 Changed 10 years ago by Janik Zikovsky

  • Status changed from verify to assigned

comment:8 Changed 10 years ago by Janik Zikovsky

Also Russell wants the mantid.properties search to go in this order:

  • Current working dir
  • Path to executable
  • MANTIDPATH folder.

To which I add: a MANTIDPROPERTIES environment var to give a full path to an extra properties file.

comment:9 Changed 10 years ago by Janik Zikovsky

(In [9848]) Refs #2584: Use an environment var to specify the mantid.properties file instead.

comment:10 Changed 10 years ago by Janik Zikovsky

  • Status changed from assigned to accepted

comment:11 Changed 10 years ago by Janik Zikovsky

(In [9851]) Refs #2584

comment:12 Changed 10 years ago by Janik Zikovsky

(In [9852]) Refs #2584: new environment variable is not really testable and always fails on windows due to file access errors. Removing test.

comment:13 Changed 10 years ago by Janik Zikovsky

  • Status changed from accepted to verify

comment:14 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:15 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I was able to change the log file location by adding logging.channels.fileChannel.path to my .mantid/Mantid.user.properties MANTIDLOGPATH did not work No info how to change logfile path at runtime from MantidPlot

comment:16 Changed 9 years ago by Janik Zikovsky

The MANTIDLOGPATH trick is intentionally un-documented because Russell preferred it that way. It should work by doing this though:

MANTIDLOGPATH=/path/to/mantid.log ./MantidPlot

comment:17 Changed 9 years ago by Janik Zikovsky

  • Status changed from reopened to accepted
  • Milestone changed from Iteration 28 to Iteration 29

comment:18 Changed 9 years ago by Janik Zikovsky

  • Status changed from accepted to verify
  • Resolution set to fixed

(In [11192]) Fixes #2584: MANTIDLOGPATH environment variable works for me (make sure when testing to set your logging.channels.fileFilterChannel.level= information line so that there is something to be written.

comment:19 Changed 9 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester changed from Andrei Savici to Martyn Gigg

comment:20 Changed 9 years ago by Martyn Gigg

  • Status changed from verifying to closed

All seems to work as intended.

comment:21 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3431

Note: See TracTickets for help on using tickets.