Closed bgwalter closed 11 years ago
@vpascow I tried allowing variable log file names when I looked into the previous logging issue, #95 , and it was unsuccessful. I am not 100% sure of the reasoning why, but from what I read about the logging utility, it can only run one instance of the logger, so it can therefore only use one file. What would happen with variable log files:
eg.
database --> calls fL.debug("databaseLog.log")
now any errors would be logged in database. but then the master runs:
master --> calls fL.debug("masterLog.log")
now that that there are two instances of logger running, one logging to databaseLog, and one logging to masterLog, the library will essentially drop the oldest instance of a logger, and funnel all logs through the new one.
So now database and master both log to masterLog.log.
This of course gets more complicated in our system because we have more than just those two scripts calling logging. I read of ways to allow for multiple logging instances to exist, if we import logging.config
instead of logging
, but I was unsuccessful in getting that to actually log anything properly.
Fixed in issue #128
line 47:
Perhaps debug() could take the name of the file that it will be logging to, so it would be called as fL.debug("nameOfErrorLog.log")
Or each program could call their own debug function like is already happening with the chunkdebug right below debug.
Also, are we putting these logs into the main director where everything is, or are they going into httpSevrerFiles? I think @rohailaltaf knows something about this.