Changeset 461 in tmcsimulator for trunk/src/python
- Timestamp:
- 07/23/2019 12:41:23 PM (7 years ago)
- Location:
- trunk/src/python/unifiedlogger
- Files:
-
- 1 added
- 2 edited
-
activitylog_watcher.py (added)
-
logging_service.py (modified) (2 diffs)
-
wing_project.wpr (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/python/unifiedlogger/logging_service.py
r454 r461 1 import cms_watcher, cad_watcher, time, json, ConfigParser1 import cms_watcher, cad_watcher, activitylog_watcher, time, json, ConfigParser 2 2 # Unified Logging Service 3 3 # jdalbey 7/6/2019 … … 29 29 f.close() 30 30 # List of the available plugin modules 31 plugins = ["cms_watcher","cad_watcher" ]31 plugins = ["cms_watcher","cad_watcher","activitylog_watcher"] 32 32 #FOR each plugin LOOP 33 33 for plugin in plugins: 34 # dynamically load the setup function for this plugin 34 # dynamically load the setup function for this plugin 35 35 plugmodule = globals()[plugin] 36 36 setupfunc = getattr(plugmodule, 'setup') -
trunk/src/python/unifiedlogger/wing_project.wpr
r454 r461 184 184 'toolbox-tree-sel': ''})], 185 185 'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('logging_service.py'), 186 {'attrib-starts': [(' startup|0|',187 17)],188 'code-line': ' def startup():\n',189 'first-line': 12L,186 {'attrib-starts': [('getSimTime|0|', 187 7)], 188 'code-line': ' print "Error loading json for elapsed time"\n', 189 'first-line': 0L, 190 190 'folded-linenos': [], 191 'sel-line': 1 7L,192 'sel-line-start': 513L,193 'selection_end': 527L,194 'selection_start': 527L,191 'sel-line': 14L, 192 'sel-line-start': 410L, 193 'selection_end': 460L, 194 'selection_start': 460L, 195 195 'zoom': 0L}, 196 1563295110.747974], 197 [loc('get_app_properties.py'), 196 1563914714.187541], 197 [loc('cad_watcher.py'), 198 {'attrib-starts': [('isFull|0|', 199 16)], 200 'code-line': '\n', 201 'first-line': 18L, 202 'folded-linenos': [], 203 'sel-line': 18L, 204 'sel-line-start': 559L, 205 'selection_end': 559L, 206 'selection_start': 559L, 207 'zoom': 0L}, 208 1563914983.485065], 209 [loc('activitylog_watcher.py'), 198 210 {'attrib-starts': [], 199 'code-line': '', 200 'first-line': 0L, 201 'folded-linenos': [], 202 'sel-line': 0L, 203 'sel-line-start': 0L, 204 'selection_end': 0L, 205 'selection_start': 0L, 206 'zoom': 0L}, 207 1563295114.739899], 208 [loc('logging_service.py'), 209 {'attrib-starts': [('startup|0|', 210 17)], 211 'code-line': 'def startup():\n', 212 'first-line': 12L, 213 'folded-linenos': [], 214 'sel-line': 17L, 215 'sel-line-start': 513L, 216 'selection_end': 527L, 217 'selection_start': 527L, 218 'zoom': 0L}, 219 1563295120.252652], 211 'code-line': '# Local main for unit testing\n', 212 'first-line': 48L, 213 'folded-linenos': [], 214 'sel-line': 50L, 215 'sel-line-start': 1431L, 216 'selection_end': 1460L, 217 'selection_start': 1460L, 218 'zoom': 0L}, 219 1563915276.741928], 220 220 [loc('../../../../../../../../usr/lib/python2.7/ConfigParser.py'), 221 221 {'attrib-starts': [('ConfigParser|0|', … … 231 231 'selection_start': 22028L, 232 232 'zoom': 0L}, 233 1563295122.349933], 234 [loc('logging_service.py'), 235 {'attrib-starts': [('startup|0|', 236 17)], 237 'code-line': 'def startup():\n', 238 'first-line': 12L, 239 'folded-linenos': [], 240 'sel-line': 17L, 241 'sel-line-start': 513L, 242 'selection_end': 527L, 243 'selection_start': 527L, 244 'zoom': 0L}, 245 1563295126.806403], 246 [loc('__main__.py'), 247 {'attrib-starts': [('main|0|', 248 2)], 249 'code-line': ' except: # If config file not found, use a quest'\ 250 'ion mark placeholder \n', 251 'first-line': 0L, 252 'folded-linenos': [], 253 'sel-line': 8L, 254 'sel-line-start': 356L, 255 'selection_end': 417L, 256 'selection_start': 417L, 257 'zoom': 0L}, 258 1563298825.820571], 259 [loc('cad_watcher.py'), 260 {'attrib-starts': [('readFile|0|', 261 20)], 262 'code-line': 'def readFile():\n', 263 'first-line': 15L, 264 'folded-linenos': [], 265 'sel-line': 20L, 266 'sel-line-start': 575L, 267 'selection_end': 590L, 268 'selection_start': 590L, 269 'zoom': 0L}, 270 1563298863.068667], 271 [loc('logging_service.py'), 272 {'attrib-starts': [('startup|0|', 273 17)], 274 'code-line': 'def startup():\n', 275 'first-line': 12L, 276 'folded-linenos': [], 277 'sel-line': 17L, 278 'sel-line-start': 513L, 279 'selection_end': 527L, 280 'selection_start': 527L, 281 'zoom': 0L}, 282 1563298890.003056], 283 [loc('../../../config/logging_service.cfg'), 233 1563915287.423714], 234 [loc('activitylog_watcher.py'), 284 235 {'attrib-starts': [], 285 'code-line': '[Paths]\n', 286 'first-line': 0L, 287 'folded-linenos': [], 288 'sel-line': 0L, 289 'sel-line-start': 0L, 290 'selection_end': 0L, 291 'selection_start': 0L, 292 'zoom': 0L}, 293 1563298905.850272], 294 [loc('logging_service.py'), 295 {'attrib-starts': [('startup|0|', 296 17)], 297 'code-line': ' # get path to output file from configuration\n', 298 'first-line': 12L, 299 'folded-linenos': [], 300 'sel-line': 18L, 301 'sel-line-start': 528L, 302 'selection_end': 720L, 303 'selection_start': 528L, 304 'zoom': 0L}, 305 1563298925.9103], 306 [loc('cad_watcher.py'), 307 {'attrib-starts': [('readFile|0|', 308 20)], 309 'code-line': ' text_file = open(logfilepath + "CADcomments.'\ 310 'log", "r")\n', 311 'first-line': 12L, 312 'folded-linenos': [], 313 'sel-line': 28L, 314 'sel-line-start': 813L, 315 'selection_end': 852L, 316 'selection_start': 852L, 317 'zoom': 0L}, 318 1563298944.867817], 319 [loc('logging_service.py'), 320 {'attrib-starts': [('startup|0|', 321 17)], 322 'code-line': ' # get path to output file from configuration\n', 323 'first-line': 12L, 324 'folded-linenos': [], 325 'sel-line': 18L, 326 'sel-line-start': 528L, 327 'selection_end': 720L, 328 'selection_start': 528L, 329 'zoom': 0L}, 330 1563298961.49365], 331 [loc('../../../config/logging_service.cfg'), 332 {'attrib-starts': [], 333 'code-line': '[Paths]\n', 334 'first-line': 0L, 335 'folded-linenos': [], 336 'sel-line': 0L, 337 'sel-line-start': 0L, 338 'selection_end': 0L, 339 'selection_start': 0L, 340 'zoom': 0L}, 341 1563298965.173624], 342 [loc('cad_watcher.py'), 343 {'attrib-starts': [('readFile|0|', 344 20)], 345 'code-line': ' config = ConfigParser.ConfigParser()\n', 346 'first-line': 0L, 347 'folded-linenos': [], 348 'sel-line': 22L, 349 'sel-line-start': 640L, 350 'selection_end': 640L, 351 'selection_start': 640L, 352 'zoom': 0L}, 353 1563299005.834573], 354 [loc('__main__.py'), 355 {'attrib-starts': [], 356 'code-line': 'import logging_service, os, ConfigParser\n', 357 'first-line': 0L, 358 'folded-linenos': [], 359 'sel-line': 0L, 360 'sel-line-start': 0L, 361 'selection_end': 40L, 362 'selection_start': 28L, 363 'zoom': 0L}, 364 1563299012.548244], 365 [loc('cad_watcher.py'), 366 {'attrib-starts': [('readFile|0|', 367 20)], 368 'code-line': ' # get path to input file from configuration\n', 236 'code-line': '# Local main for unit testing\n', 369 237 'first-line': 18L, 370 238 'folded-linenos': [], 371 'sel-line': 21L, 372 'sel-line-start': 605L, 373 'selection_end': 628L, 374 'selection_start': 628L, 375 'zoom': 0L}, 376 1563311309.128491], 377 [loc('logging_service.py'), 378 {'attrib-starts': [('getSimTime|0|', 379 7)], 380 'code-line': ' h, m = divmod(m, 60)\n', 381 'first-line': 3L, 382 'folded-linenos': [], 383 'sel-line': 14L, 384 'sel-line-start': 444L, 385 'selection_end': 468L, 386 'selection_start': 468L, 387 'zoom': 0L}, 388 1563311363.078389], 239 'sel-line': 50L, 240 'sel-line-start': 1431L, 241 'selection_end': 1460L, 242 'selection_start': 1460L, 243 'zoom': 0L}, 244 1563915319.659486], 389 245 [loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'), 390 246 {'attrib-starts': [('JSONDecoder|0|', … … 400 256 'selection_start': 13534L, 401 257 'zoom': 0L}, 402 1563311407.328163], 258 1563915321.261377], 259 [loc('activitylog_watcher.py'), 260 {'attrib-starts': [], 261 'code-line': '# Local main for unit testing\n', 262 'first-line': 18L, 263 'folded-linenos': [], 264 'sel-line': 50L, 265 'sel-line-start': 1431L, 266 'selection_end': 1460L, 267 'selection_start': 1460L, 268 'zoom': 0L}, 269 1563915322.700758], 270 [loc('__main__.py'), 271 {'attrib-starts': [], 272 'code-line': 'import logging_service, os, ConfigParser\n', 273 'first-line': 0L, 274 'folded-linenos': [], 275 'sel-line': 0L, 276 'sel-line-start': 0L, 277 'selection_end': 40L, 278 'selection_start': 28L, 279 'zoom': 0L}, 280 1563915338.030142], 403 281 [loc('logging_service.py'), 404 {'attrib-starts': [('getSimTime|0|', 405 7)], 406 'code-line': ' h, m = divmod(m, 60)\n', 282 {'attrib-starts': [('startup|0|', 283 20)], 284 'code-line': ' # dynamically load the setup function for th'\ 285 'is plugin \n', 286 'first-line': 24L, 287 'folded-linenos': [], 288 'sel-line': 33L, 289 'sel-line-start': 1119L, 290 'selection_end': 1180L, 291 'selection_start': 1180L, 292 'zoom': 0L}, 293 1563915525.660434], 294 [loc('cms_watcher.py'), 295 {'attrib-starts': [], 296 'code-line': '# Read the cms message file\n', 297 'first-line': 12L, 298 'folded-linenos': [], 299 'sel-line': 17L, 300 'sel-line-start': 410L, 301 'selection_end': 606L, 302 'selection_start': 410L, 303 'zoom': 0L}, 304 1563915548.444179], 305 [loc('activitylog_watcher.py'), 306 {'attrib-starts': [('getLogEntries|0|', 307 42)], 308 'code-line': ' currList = []\n', 309 'first-line': 33L, 310 'folded-linenos': [], 311 'sel-line': 45L, 312 'sel-line-start': 1303L, 313 'selection_end': 1303L, 314 'selection_start': 1303L, 315 'zoom': 0L}, 316 1563915776.997235], 317 [loc('logging_service.py'), 318 {'attrib-starts': [('startup|0|', 319 20)], 320 'code-line': ' trimmed_item = item.strip()\n', 321 'first-line': 30L, 322 'folded-linenos': [], 323 'sel-line': 57L, 324 'sel-line-start': 1955L, 325 'selection_end': 1955L, 326 'selection_start': 1955L, 327 'zoom': 0L}, 328 1563915793.39434], 329 [loc('activitylog_watcher.py'), 330 {'attrib-starts': [('getLogEntries|0|', 331 42)], 332 'code-line': ' return currList\n', 333 'first-line': 37L, 334 'folded-linenos': [], 335 'sel-line': 48L, 336 'sel-line-start': 1427L, 337 'selection_end': 1427L, 338 'selection_start': 1427L, 339 'zoom': 0L}, 340 1563915821.788454], 341 [loc('logging_service.py'), 342 {'attrib-starts': [('startup|0|', 343 20)], 344 'code-line': ' trimmed_item = item.strip()\n', 345 'first-line': 39L, 346 'folded-linenos': [], 347 'sel-line': 57L, 348 'sel-line-start': 1955L, 349 'selection_end': 1955L, 350 'selection_start': 1955L, 351 'zoom': 0L}, 352 1563915837.345044], 353 [loc('activitylog_watcher.py'), 354 {'attrib-starts': [('getLogEntries|0|', 355 42)], 356 'code-line': ' return currList\n', 357 'first-line': 37L, 358 'folded-linenos': [], 359 'sel-line': 48L, 360 'sel-line-start': 1427L, 361 'selection_end': 1427L, 362 'selection_start': 1427L, 363 'zoom': 0L}, 364 1563915839.151954], 365 [loc('logging_service.py'), 366 {'attrib-starts': [('startup|0|', 367 20)], 368 'code-line': ' trimmed_item = item.strip()\n', 369 'first-line': 50L, 370 'folded-linenos': [], 371 'sel-line': 57L, 372 'sel-line-start': 1955L, 373 'selection_end': 1955L, 374 'selection_start': 1955L, 375 'zoom': 0L}, 376 1563915884.294776], 377 [loc('activitylog_watcher.py'), 378 {'attrib-starts': [('getLogEntries|0|', 379 42)], 380 'code-line': ' return currList\n', 381 'first-line': 37L, 382 'folded-linenos': [], 383 'sel-line': 48L, 384 'sel-line-start': 1427L, 385 'selection_end': 1427L, 386 'selection_start': 1427L, 387 'zoom': 0L}, 388 1563915907.118035], 389 [loc('logging_service.py'), 390 {'attrib-starts': [('startup|0|', 391 20)], 392 'code-line': ' trimmed_item = item.strip()\n', 393 'first-line': 50L, 394 'folded-linenos': [], 395 'sel-line': 57L, 396 'sel-line-start': 1955L, 397 'selection_end': 1955L, 398 'selection_start': 1955L, 399 'zoom': 0L}, 400 1563915945.26135], 401 [loc('activitylog_watcher.py'), 402 {'attrib-starts': [('getLogEntries|0|', 403 42)], 404 'code-line': ' currList = []\n', 405 'first-line': 37L, 406 'folded-linenos': [], 407 'sel-line': 45L, 408 'sel-line-start': 1303L, 409 'selection_end': 1303L, 410 'selection_start': 1303L, 411 'zoom': 0L}, 412 1563916207.12504], 413 [loc('cms_watcher.py'), 414 {'attrib-starts': [('readFile|0|', 415 18)], 416 'code-line': ' \n', 407 417 'first-line': 6L, 408 418 'folded-linenos': [], 409 'sel-line': 14L, 410 'sel-line-start': 444L, 411 'selection_end': 468L, 412 'selection_start': 468L, 413 'zoom': 0L}, 414 1563311428.009251], 415 [loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'), 416 {'attrib-starts': [('JSONDecoder|0|', 417 271), 418 ('JSONDecoder|0|.raw_decode|0|', 419 369)], 420 'code-line': ' obj, end = self.scan_once(s, idx)\n', 421 'first-line': 370L, 422 'folded-linenos': [], 423 'sel-line': 379L, 424 'sel-line-start': 13534L, 425 'selection_end': 13534L, 426 'selection_start': 13534L, 427 'zoom': 0L}, 428 1563311437.82119]], 419 'sel-line': 21L, 420 'sel-line-start': 564L, 421 'selection_end': 565L, 422 'selection_start': 565L, 423 'zoom': 0L}, 424 1563916220.372856]], 429 425 20), 430 'current-loc': loc('logging_service.py'), 431 'editor-state-list': [(loc('cad_watcher.py'), 432 {'attrib-starts': [('readFile|0|', 433 20)], 434 'code-line': ' # get path to input file f'\ 435 'rom configuration\n', 426 'current-loc': loc('activitylog_watcher.py'), 427 'editor-state-list': [(loc('activitylog_watcher.py'), 428 {'attrib-starts': [], 429 'code-line': '# Local main for unit testing'\ 430 '\n', 431 'first-line': 43L, 432 'folded-linenos': [], 433 'sel-line': 57L, 434 'sel-line-start': 1714L, 435 'selection_end': 1743L, 436 'selection_start': 1743L, 437 'zoom': 0L}), 438 (loc('cad_watcher.py'), 439 {'attrib-starts': [('isFull|0|', 440 16)], 441 'code-line': '\n', 436 442 'first-line': 18L, 437 443 'folded-linenos': [], 438 'sel-line': 21L,439 'sel-line-start': 605L,440 'selection_end': 628L,441 'selection_start': 628L,444 'sel-line': 18L, 445 'sel-line-start': 559L, 446 'selection_end': 559L, 447 'selection_start': 559L, 442 448 'zoom': 0L}), 443 449 (loc('cms_watcher.py'), 444 {'attrib-starts': [('isEmpty|0|', 445 12)], 446 'code-line': ' return cmsitem == ":::::"'\ 447 '\n', 448 'first-line': 0L, 450 {'attrib-starts': [('readFile|0|', 451 18)], 452 'code-line': ' \n', 453 'first-line': 6L, 449 454 'folded-linenos': [], 450 'sel-line': 13L, 451 'sel-line-start': 324L, 452 'selection_end': 353L, 453 'selection_start': 353L, 454 'zoom': 0L}), 455 (loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'), 456 {'attrib-starts': [('JSONDecoder|0|', 457 271), 458 ('JSONDecoder|0|.raw_decode|0|', 459 369)], 460 'code-line': ' obj, end = self.sc'\ 461 'an_once(s, idx)\n', 462 'first-line': 370L, 463 'folded-linenos': [], 464 'sel-line': 379L, 465 'sel-line-start': 13534L, 466 'selection_end': 13534L, 467 'selection_start': 13534L, 455 'sel-line': 21L, 456 'sel-line-start': 564L, 457 'selection_end': 565L, 458 'selection_start': 565L, 468 459 'zoom': 0L}), 469 460 (loc('../../../config/logging_service.cfg'), … … 478 469 'zoom': 0L}), 479 470 (loc('logging_service.py'), 480 {'attrib-starts': [(' getSimTime|0|',481 7)],482 'code-line': ' print "Error loading js'\483 ' on for elapsed time"\n',484 'first-line': 0L,471 {'attrib-starts': [('startup|0|', 472 20)], 473 'code-line': ' trimmed_item ='\ 474 ' item.strip()\n', 475 'first-line': 50L, 485 476 'folded-linenos': [], 486 'sel-line': 14L,487 'sel-line-start': 410L,488 'selection_end': 460L,489 'selection_start': 460L,477 'sel-line': 57L, 478 'sel-line-start': 1955L, 479 'selection_end': 1955L, 480 'selection_start': 1955L, 490 481 'zoom': 0L}), 491 482 (loc('__main__.py'), … … 502 493 'has-focus': True, 503 494 'locked': False}, 504 [loc('cad_watcher.py'), 495 [loc('activitylog_watcher.py'), 496 loc('cad_watcher.py'), 505 497 loc('cms_watcher.py'), 506 loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'),507 498 loc('../../../config/logging_service.cfg'), 508 499 loc('logging_service.py'), 509 500 loc('__main__.py')]), 510 501 'open_files': [u'../../../config/logging_service.cfg', 502 u'cad_watcher.py', 511 503 u'__main__.py', 504 u'logging_service.py', 512 505 u'cms_watcher.py', 513 u'cad_watcher.py', 514 u'logging_service.py']}, 506 u'activitylog_watcher.py']}, 515 507 'saved_notebook_display': None, 516 508 'split_percents': {0: 0.5}, … … 519 511 'traversal_pos': ((0, 520 512 3), 521 1563 311427.998152),513 1563915857.693931), 522 514 'user_data': {}}, 523 515 'saved_notebook_display': None, … … 527 519 'traversal_pos': ((0, 528 520 4), 529 1563 311544.529663),521 1563916336.330344), 530 522 'user_data': {}}, 531 523 'window-alloc': (29, … … 533 525 1197, 534 526 722)}]} 535 guimgr.recent-documents = [loc('logging_service.py'), 536 loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'), 527 guimgr.recent-documents = [loc('activitylog_watcher.py'), 528 loc('cms_watcher.py'), 529 loc('logging_service.py'), 530 loc('__main__.py'), 537 531 loc('cad_watcher.py'), 538 loc('__main__.py'), 539 loc('../../../config/logging_service.cfg'), 540 loc('cms_watcher.py')] 532 loc('../../../config/logging_service.cfg')] 541 533 guimgr.visual-state = {loc('get_app_properties.py'): {'attrib-starts': [], 542 534 'code-line': '', … … 582 574 'selection_end': 22028L, 583 575 'selection_start': 22028L, 576 'zoom': 0L}, 577 loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'): {'a'\ 578 'ttrib-starts': [('JSONDecoder|0|', 579 271), 580 ('JSONDecoder|0|.raw_decode|0|', 581 369)], 582 'code-line': ' obj, end = self.scan_once(s, idx)\n', 583 'first-line': 370L, 584 'folded-linenos': [], 585 'sel-line': 379L, 586 'sel-line-start': 13534L, 587 'selection_end': 13534L, 588 'selection_start': 13534L, 584 589 'zoom': 0L}} 585 590 proj.build-cmd = {None: ('default',
Note: See TracChangeset
for help on using the changeset viewer.
