Skip to content

A really small logger for Pharo applications.

License

Notifications You must be signed in to change notification settings

ClotildeToullec/TinyLogger

 
 

Repository files navigation

TinyLogger

Build Status Coverage Status

A really small logger for Pharo applications.

Installation

To install TinyLogger on your Pharo image, execute the following script:

Metacello new
	githubUser: 'jecisc' project: 'TinyLogger' commitish: 'v1.x.x' path: 'src';
	baseline: 'TinyLogger';
	load

To add TinyLogger to your baseline:

spec
	baseline: 'TinyLogger'
	with: [ spec repository: 'github://jecisc/TinyLogger:v1.x.x/src' ]

Note you can replace the #master by another branch such as #development or a tag such as #v1.0.0, #v1.? or #v1.2.? .

Quick start

To create a file logger using a file Progress.log and records all messages as soon as the project is loaded in a a Pharo image, in the initialize method (class side) of a project put the following:

TinyLogger default 
    addFileLoggerNamed: 'Progress.log'.

To create a file logger that is reset each time you run an application. Put the following in the method that is run:

TinyLogger default 
    ensureFileLoggerNamed: 'Progress.log'; "Add the file logger only if not already"
    clearLog "This will delete the previous 'Progress.log' file".

Then write a message to the log using record:

'Uh oh. Something happened.' record

Or write a message to the log for the execution of an action using execute:recordedAs::

self execute: [ "Some code doing something" ] recordedAs: 'Launching bananas.'

Now, if you want to know more about the project, let's proceed on a more detailed documentation.

Documentation

Documentation is split into separate links as follows:

Version management

This project use semantic versioning to define the releases. This means that each stable release of the project will be assigned a version number of the form vX.Y.Z.

  • X defines the major version number
  • Y defines the minor version number
  • Z defines the patch version number

When a release contains only bug fixes, the patch number increases. When the release contains new features that are backward compatible, the minor version increases. When the release contains breaking changes, the major version increases.

Thus, it should be safe to depend on a fixed major version and moving minor version of this project.

Smalltalk versions compatibility

Version Compatible Pharo versions
1.x.x Pharo 61, 70, 80, 90, 10, 11

Contact

If you have any questions or problems do not hesitate to open an issue or contact cyril (a) ferlicot.me

About

A really small logger for Pharo applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Smalltalk 100.0%