()
| 220 | eos.config.set_lang(localeSettings.get_eos_locale()) |
| 221 | |
| 222 | def defLogging(): |
| 223 | global debug |
| 224 | global logPath |
| 225 | global loggingLevel |
| 226 | global logging_setup |
| 227 | |
| 228 | try: |
| 229 | if debug: |
| 230 | logging_setup = NestedSetup([ |
| 231 | # make sure we never bubble up to the stderr handler |
| 232 | # if we run out of setup handling |
| 233 | NullHandler(), |
| 234 | StreamHandler( |
| 235 | sys.stdout, |
| 236 | bubble=False, |
| 237 | level=loggingLevel |
| 238 | ), |
| 239 | TimedRotatingFileHandler( |
| 240 | logPath, |
| 241 | level=0, |
| 242 | backup_count=3, |
| 243 | bubble=True, |
| 244 | date_format='%Y-%m-%d', |
| 245 | ), |
| 246 | ]) |
| 247 | else: |
| 248 | logging_setup = NestedSetup([ |
| 249 | # make sure we never bubble up to the stderr handler |
| 250 | # if we run out of setup handling |
| 251 | NullHandler(), |
| 252 | FingersCrossedHandler( |
| 253 | TimedRotatingFileHandler( |
| 254 | logPath, |
| 255 | level=0, |
| 256 | backup_count=3, |
| 257 | bubble=False, |
| 258 | date_format='%Y-%m-%d', |
| 259 | ), |
| 260 | action_level=ERROR, |
| 261 | buffer_size=1000, |
| 262 | # pull_information=True, |
| 263 | # reset=False, |
| 264 | ) |
| 265 | ]) |
| 266 | except (KeyboardInterrupt, SystemExit): |
| 267 | raise |
| 268 | except: |
| 269 | print("Critical error attempting to setup logging. Falling back to console only.") |
| 270 | logging_setup = NestedSetup([ |
| 271 | # make sure we never bubble up to the stderr handler |
| 272 | # if we run out of setup handling |
| 273 | NullHandler(), |
| 274 | StreamHandler( |
| 275 | sys.stdout, |
| 276 | bubble=False |
| 277 | ) |
| 278 | ]) |
| 279 |
nothing calls this directly
no outgoing calls
no test coverage detected