Skip to content
Browse files

More doc

  • Loading branch information...
1 parent 9e67e9c commit 4250e052f6a7469675f931e578b258824b3000d0 @sdolard committed Dec 19, 2011
Showing with 16 additions and 14 deletions.
  1. +9 −8 README.md
  2. +7 −6 lib/log-to-file.js
View
17 README.md
@@ -32,27 +32,27 @@ log.on('error', function(err){
});
log.on('writting', function(){
- //something
+ // starting to write buffered data
});
log.on('write', function(){
- //something
+ // something was juste written
});
log.on('written', function(filePath){
- //something
+ // every buffered data have been written
});
log.on('backuped', function (filePath, newFilePath) {
- //something
+ // filePath was renamed to newFilePath
});
log.on('gzipping', function (filePath, newFilePath) {
- //something
+ // starting to gzip filePath to gzippedFilePath
});
log.on('gzipped', function (filePath, newFilePath) {
- //something
+ // filePath was gzipped to gzippedFilePath
});
log.write("hello world");
@@ -104,8 +104,9 @@ Returns a LogToFile instance.
* @params {boolean} [config.verbose] enable verbose mode, default to false
*
* @event error({object} exception): when an async exception occured
-* @event writting({string} filePath): when starting to write
-* @event written({string} filePath): when everything is written
+* @event writting({string} filePath): when starting to write buffered data
+* @event write(): when something was juste write
+* @event written({string} filePath): when every buffered data have been written
* @event backuped({string} filePath, {string} newFilePath): when filePath was renamed to newFilePath
* @event gzipping({string} filePath, {string} gzippedFilePath): when starting to gzip filePath to gzippedFilePath
* @event gzipped({string} filePath, {string} gzippedFilePath): when filePath was gzipped to gzippedFilePath
View
13 lib/log-to-file.js
@@ -107,12 +107,13 @@ function formatIndex(index, length) {
* @params {number} [config.compressionLevel] [1-9] 1: BEST_SPEED, 9: BEST_COMPRESSION, default to 1
* @params {boolean} [config.verbose] enable verbose mode, default to false
*
-* @event error({object} exception)
-* @event writting({string} filePath): starting to write everything
-* @event written({string} filePath): everything is written
-* @event backuped({string} filePath, {string} newFilePath): filePath was renamed to newFilePath
-* @event gzipping({string} filePath, {string} gzippedFilePath): starting to gzip filePath to gzippedFilePath
-* @event gzipped({string} filePath, {string} gzippedFilePath): filePath was gzipped to gzippedFilePath
+* @event error({object} exception): when an async exception occured
+* @event writting({string} filePath): when starting to write buffered data
+* @event write(): when something was juste write
+* @event written({string} filePath): when every buffered data have been written
+* @event backuped({string} filePath, {string} newFilePath): when filePath was renamed to newFilePath
+* @event gzipping({string} filePath, {string} gzippedFilePath): when starting to gzip filePath to gzippedFilePath
+* @event gzipped({string} filePath, {string} gzippedFilePath): when filePath was gzipped to gzippedFilePath
*
* @throws EEMPTYFILENAME: when config.filename is not set
* @throws EEMPTYDIRECTORY: when config.directory is not set

0 comments on commit 4250e05

Please sign in to comment.
Something went wrong with that request. Please try again.