NorwegianVeterinaryInstitute / DemultiplexRawSequenceData

A workflow automation script: demultiplex the library sequence, run quality checks, deliver to archiving and processing afterwards
GNU General Public License v3.0
1 stars 0 forks source link

feature request: logging #16

Closed georgemarselis-nvi closed 1 year ago

georgemarselis-nvi commented 2 years ago

What has to be done

-[ ] log to syslog so later on we can ship the logs -[ ] log to file log file hierarchy is roughly outlined below

THOUGHTS ABOUT LOGGING

arvindsundaram commented 2 years ago

I am not sure if we need to maintain a SQL database for the logs. Any specific reason for this?

georgemarselis-nvi commented 2 years ago

It will be an sqlite3 file, I mean, not a whole host. And yes, metrics (and some professional curiosity) and if we have enough data, a paper.

georgemarselis-nvi commented 1 year ago

I was agonizing for over a week over this feature request: add proper syslog/logging to this demultiplexing pipeline: Learn how to log things beyond a print() statement, what counts as info, warning and critical^[1] , what is useful and what is not, how to log to multiple locations/destinations, how to log to console with color, while sending the same message unformatted to syslog and file...

... then i just bit the bullet: copied over all the output messages to a new script that prints the same things but does none of the work and said "let me play with that". At last, i got something I can start working with.

... moving right along, i guess. better to produce something imperfect than nothing at all (or worse, wait for your inner davinci to wake up)

[1] at least i knew what counted as debug!

georgemarselis-nvi commented 1 year ago

image

Lots of good progress tonight.

Tomorrow: figuring out how to write messages using formatters according to destination.

georgemarselis-nvi commented 1 year ago

do we need millisecond stamping, or is second good enough? datefmt = '%Y-%m-%d %H:%M:%S' vs datefmt = '%Y-%m-%d %H:%M:%S.%f'[:-3]

georgemarselis-nvi commented 1 year ago

logging run log, , implemented

cumulative run log, , implemented

syslog log, , implemented

email log, success, implemented, needs testing

email log, failures( many points of ), implemented, needs testing

workplace notifications on the horizon.

georgemarselis-nvi commented 1 year ago

update: only thing left is workplace notifications, for now.

email notifications on failures, need refactoring to modularize then so we can test them

georgemarselis-nvi commented 1 year ago

this is not a blocking issue for version 1.0

if add-ins are needed, we can come back.

removing from starred issues.

georgemarselis-nvi commented 1 year ago

this issue is like a well done steak. Closing.