Between the v1 and v2 some things changed.
V2 does not work anymore with Pharo 6 and 6.1. If your project is on Pharo 6, keep using the version 1 of TinyLogger.
In the past it was possible to do:
TinyLogger default addLogger: (TinyTranscriptLogger for: TinyLogger default)Now this does not work anymore because #for: is now adding itself to the parameter. If you still do this, yu will end up with the logger duplicated.
You can now do:
TinyLogger default addLogger: TinyTranscriptLogger newor:
TinyLogger default addTrascriptLogger "or ensureTranscriptLogger"In v1 the timestamp was followed by a space before the colon.
Like this:
2018-11-29T23:19:55.511775+01:00 : This is a string to log
In the v2 this was removed. If you want this space, you can add it the the #timestampFormatBlock:.
TinyLogger default timestampFormatBlock: [ :aStream :timestamp | aStream << timestamp asString << ' ' ]In the past, using #execute:recordedAs: was adding some extra indentation like this:
self execute: [ 'Log' record ] recordedAs: 'Task'2018-11-29T23:21:04.897775+01:00: Begin: Task
2018-11-29T23:21:04.900775+01:00: Log
2018-11-29T23:21:04.909775+01:00: End: Task
Now it prints like this:
2018-11-29T23:21:04.897775+01:00: Begin: Task
2018-11-29T23:21:04.900775+01:00: Log
2018-11-29T23:21:04.909775+01:00: End: Task
In order to get the previous behavior you can use #indentExecutionBlock: like this:
TinyLogger default indentExecutionBlock: true