PackageDescription: HypertextLogger


Hypertext Logger

Last published: July 11, 2010 by 'ernest'

Defines 5 Classes
Extends 5 Classes


HypertextLogging.Logger is a simple logger that incrementally writes HTML to a file.

copyright (c) 2009,2010. ernest.micklei @ philemonworks.com. MIT License

Test example:

| log |
log := HypertextLogging.Logger onFileNamed: 'test-hypertextlogger'.
log info: 'See HypertextLogging.Logger class>>tests how this page was generated'.
log info: 'info entry'.
log warn: 'warn entry'.
log debug: 'debug entry'.
log error: 'error entry'.
log fatal: 'fatal entry'.
log info: [ :h | h red: 'red entry' ].
log info: [ :h | h blue: 'blue entry' ].
log info: [ :h | h green: 'green entry' ].
log info: [ :h | h link: 'http://www.philemonworks.com' title:'Link to Self Halt' ].
log indent ;info: [ :h | h print: 'Indented entries' ].
log info: [ :h | h print: 'Is indented' ].
log indent ;info: [ :h | h print: 'More indenting' ].
log info: [ :h | h strong: 'as you can see (in strong emphasis)' ].
log backIndent ;info: [ :h | h print: 'and back' ].
log backIndent ;info: [ :h | h print: 'and back' ].
log info: [ :h |
h print: 'Combine it all..'.
h red: 'Roses '.
h link: 'http://blog.doit.st' title:'doit.st'.
h blue: ' Clouds' ].
log info: 'You can change the format of each entry by providing your own formatBlock.'.
log info: 'You can change the CSS of this page by providing your own mapping.'.
log info: 'You can reset,disable and close the HypertextLogger'.
log info: '& it knows about '.

log captureTranscript.
Transcript cr ;show: 'This Transcript entry is logged'.
Transcript cr ;show: ' after a CR is written to it.'.
log info: 'or a new log request is sent'.
log release.

log logMessageSend. "writes the MessageSend that invoked the method in which this log statement is executed. Just try it..."

log close.