DistributedTaskScheduling / JobAdder

Source code of the JobAdder project
GNU General Public License v3.0
2 stars 1 forks source link

Basic logging impl on the server module. #116

Closed nikolatzotchev closed 4 years ago

nikolatzotchev commented 4 years ago

Started implementing the logger on the server, using the python logger, this provides also levels, for now I'm using only the INFO one. The log is send to a file, is this enough or should it else be send to stdou or something else. Will add the same stuff the the worker and user later this week.

nikolatzotchev commented 4 years ago

fuck, ok they are some test not passing, that is because @ammen99 doesn't fill whole jobs when using them in the tests, should we fix that, or maybe disable logging in some cases.

nikolatzotchev commented 4 years ago

I don't get it, how all of a sudden there are 20 mypy errors when I didn't change anything involving them.

nikolatzotchev commented 4 years ago

2020-03-11-132713_grim Sometimes I'm really confused.

nikolatzotchev commented 4 years ago

I will add logging for the other components in other pr.

nikolatzotchev commented 4 years ago

I never logged errors, but I don't see many useful error cases to log on the server. If you have any idea, let me know.

nikolatzotchev commented 4 years ago

I moved the logger ini, so that it will be simpler to implement with the other components (user, workers, common) but I'm planning on doing them in different PR.

nikolatzotchev commented 4 years ago

should be good now, what should be the default logging level, error or?

JohannesGaessler commented 4 years ago

I'm not entirely sure. I think we should set the default logging level to debug because the likelihood of our software containing bugs is still relatively high.

ammen99 commented 4 years ago

I think we should set the default logging level to debug because the likelihood of our software containing bugs is still relatively high.

I'd say we should be able to set the level with an env var or something like that, and default to error. Consider that the log is stdout, so this will spit out messages in the syslog when started with systemd.

nikolatzotchev commented 4 years ago

@JohannesGaessler I think I cant merge this because you have some requested changes, but I thing I fixed them already.

ammen99 commented 4 years ago

Well this has 2 approving reviews, and @JohannesGaessler's comments have been addressed, so let's move this forward.