ESS_GUIESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalc
Last change
on this file since f84d793 was
e4335ae,
checked in by Piotr Rozyczko <piotr.rozyczko@…>, 6 years ago
|
SASVIEW-957 logging changes (#158)
- rework XStream to continue to write to stdout/stderr alongside redirection; make logging level setting consistent; make log configuration more consistent
- rm XStream; QT signal in QtHandler? logging handler; only logs in Log Explorer (no stdout/stderr)
- no need to change handler level
- use QTextBrowser.append to facilitate auto-scrolling in the Log Explorer
- modify logger unit test to reflect changes (passes)
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[6722fae] | 1 | |
---|
| 2 | ############################################################################### |
---|
| 3 | ################################### LOGGING ################################### |
---|
| 4 | ############################################################################### |
---|
[64ca561] | 5 | # Main logger for SASView |
---|
[6722fae] | 6 | |
---|
[64ca561] | 7 | # SEE: https://docs.python.org/2/library/logging.html#logrecord-attributes |
---|
[6722fae] | 8 | [formatters] |
---|
| 9 | keys=simple,detailed |
---|
| 10 | |
---|
| 11 | [formatter_simple] |
---|
[463e7ffc] | 12 | #format=%(asctime)s - %(name)s - %(levelname)s - %(message)s |
---|
[64ca561] | 13 | #format=%(asctime)s - %(levelname)s : %(name)s:%(pathname)s:%(lineno)4d: %(message)s |
---|
[e4335ae] | 14 | #format=%(asctime)s - %(levelname)s : %(name)s:%(lineno)4d: %(message)s |
---|
| 15 | format=%(asctime)s - %(levelname)s: %(message)s |
---|
[463e7ffc] | 16 | datefmt=%H:%M:%S |
---|
| 17 | |
---|
[6722fae] | 18 | [formatter_detailed] |
---|
[fc22533] | 19 | #format=%(asctime)s : %(levelname)s : %(name)s: %(lineno)d: %(message)s |
---|
| 20 | format=%(asctime)s : %(levelname)s : %(name)s (%(filename)s:%(lineno)s) :: %(message)s |
---|
[6722fae] | 21 | |
---|
| 22 | ############################################################################### |
---|
| 23 | # Handlers |
---|
| 24 | |
---|
| 25 | [handlers] |
---|
| 26 | keys=console,log_file |
---|
| 27 | |
---|
| 28 | [handler_console] |
---|
| 29 | class=logging.StreamHandler |
---|
| 30 | formatter=simple |
---|
[38beeab] | 31 | level=WARNING |
---|
[6722fae] | 32 | args=tuple() |
---|
| 33 | |
---|
| 34 | [handler_log_file] |
---|
| 35 | class=logging.FileHandler |
---|
[38beeab] | 36 | level=DEBUG |
---|
[6722fae] | 37 | formatter=detailed |
---|
| 38 | args=(os.path.join(os.path.expanduser("~"),'sasview.log'),"a") |
---|
| 39 | |
---|
| 40 | ############################################################################### |
---|
| 41 | # Loggers |
---|
| 42 | |
---|
| 43 | [loggers] |
---|
[64ca561] | 44 | keys=root,saspr,sasgui,sascalc,sasmodels |
---|
[6722fae] | 45 | |
---|
| 46 | [logger_root] |
---|
[38beeab] | 47 | level=DEBUG |
---|
[6722fae] | 48 | formatter=default |
---|
| 49 | handlers=console,log_file |
---|
| 50 | |
---|
[64ca561] | 51 | [logger_sasmodels] |
---|
| 52 | level=INFO |
---|
| 53 | qualname=sas.models |
---|
| 54 | handlers=console,log_file |
---|
| 55 | propagate=0 |
---|
| 56 | |
---|
| 57 | [logger_saspr] |
---|
| 58 | level=INFO |
---|
| 59 | qualname=sas.pr |
---|
| 60 | handlers=console,log_file |
---|
| 61 | propagate=0 |
---|
| 62 | |
---|
[6722fae] | 63 | [logger_sasgui] |
---|
[38beeab] | 64 | level=DEBUG |
---|
[6722fae] | 65 | qualname=sas.sasgui |
---|
| 66 | handlers=console,log_file |
---|
[64ca561] | 67 | propagate=0 |
---|
| 68 | |
---|
[6722fae] | 69 | [logger_sascalc] |
---|
[64ca561] | 70 | level=INFO |
---|
[6722fae] | 71 | qualname=sas.sascalc |
---|
[c155a16] | 72 | handlers=console,log_file |
---|
[64ca561] | 73 | propagate=0 |
---|
[c155a16] | 74 | |
---|
Note: See
TracBrowser
for help on using the repository browser.