On 10/9/12 11:48 AM, John Fabiani wrote:
> Anybody no why the DatabaseActivityLog property is commented out? What 
> replaces it?

mac-2:dabo pmcnett$ svn log -r 5958
------------------------------------------------------------------------
r5958 | ed | 2010-08-22 13:17:38 -0700 (Sun, 22 Aug 2010) | 16 lines

Switched all of Dabo's logging to standard Python logging. Now instead of 
calling:

dabo.infoLog.write("some message")
dabo.errorLog.write("some message")

...the calls will be:

dabo.log.info("some message")
dabo.log.error("some message")

I've also merged the dbActivityLog into the same common logging. It is no longer
activated by the 'DatabaseActivityLog' in dApp; instead, you must change the
configuration before the app is run to include an actual file name to write to
instead of the default of os.devnull.

I've converted all the old calls to the new style. There should be a lot of 
testing
and a lot of feedback to improve this first step.

------------------------------------------------------------------------

Regarding "you must change the configuration", this means looking in 
settings.py and
tweaking:

206 dbLogLevel = logging.DEBUG
207 dbLogQualName = "dabo.dbActivityLog"
208 # Set the db file to None initially
209 dbLogFile = None
210 dbLogConsoleLevel = logging.ERROR
211 dbLogFileLevel = logging.DEBUG
212 dbLogDateFormat = "%Y-%m-%d %H:%M:%S"
213 dbConsoleFormat = dbFileFormat = "%(asctime)s - %(levelname)s - %(message)s"
214 dbMaxLogFileSize = 5242880    # 5 MB

I think you would set dbLogFile to the file name you want to log to. ProTip: 
make
this change in settings-override.py instead of directly in settings.py.

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to