lua-simplelog  Check-in [0bc6556ee0]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix README to match test.lua
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:0bc6556ee06743de0ac1a856e2ea89873b207f4bf746e3e59f1ab2aae0e54a55
User & Date: llmII 2019-07-11 17:46:26
Context
2019-07-11
17:53
Making README style match the code. check-in: 4bbc7e7aa4 user: llmII tags: trunk
17:46
Fix README to match test.lua check-in: 0bc6556ee0 user: llmII tags: trunk
15:22
Add a way to test and see an example. check-in: 97d92be459 user: llmII tags: trunk
Changes

Changes to README.md.

7
8
9
10
11
12
13


14
15
16
17
18
19
20
..
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
levels out of the box. Each log can use either the default write
settings, or their own. Write settings allow for telling the logger
which level's are enabled for which output.

## Future

* Perhaps allow dynamically adding levels and/or writers?



## Usage
    local log_config = {
      -- this directory must exist!
      dir = '/tmp/simplelog',
      daemonized = true,
      debug_info = true,
................................................................................
            write = 'info',
            print = 'trace'
          }
        }
      }
    }

    local log_manager = require 'simplelog'
    local uses_default = log_manager:open 'loga'
    local log1 = log_manager:open 'log1'
    -- should not print or write to file
    uses_default:trace 'This is a message'
    -- should print and write to file
    uses_default:error('Error %s', 1000)
    -- should print but not write to file







>
>







 







|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
levels out of the box. Each log can use either the default write
settings, or their own. Write settings allow for telling the logger
which level's are enabled for which output.

## Future

* Perhaps allow dynamically adding levels and/or writers?
* Perhaps allow for name formats for log files?
* Perhaps allow for each log file to have its own folder?

## Usage
    local log_config = {
      -- this directory must exist!
      dir = '/tmp/simplelog',
      daemonized = true,
      debug_info = true,
................................................................................
            write = 'info',
            print = 'trace'
          }
        }
      }
    }

    local log_manager = require 'simplelog' (log_config)
    local uses_default = log_manager:open 'loga'
    local log1 = log_manager:open 'log1'
    -- should not print or write to file
    uses_default:trace 'This is a message'
    -- should print and write to file
    uses_default:error('Error %s', 1000)
    -- should print but not write to file

Changes to rockspecs/lua-simplelog-0.1.0.rockspec.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
source = {
  url = '',
  file = ''
}
description = {
  summary = 'A simple, capable, better logger for lua.',
  detailed = [[
    lua-simplelog is a logger for lua with no external dependencies.
    It's aim is to provide a performant, simple logger, allowing for a
    log directory, opening multiple logs through its management
    facilities, and splitting upon dates. It also supports
    daemonization of the process utilizing it.
  ]],
  license = 'OWL',
  homepage = 'https://code.amlegion.org/lua-simplelog'
}
dependencies = {
  "lua >= 5.3"
}
build = {
  type = 'builtin',
  modules = {
    simplelog = 'simplelog.lua'
  }
}







|
|
|
|
|













3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
source = {
  url = '',
  file = ''
}
description = {
  summary = 'A simple, capable, better logger for lua.',
  detailed = [[
    lua-simplelog is a logger for lua. It's aim is to provide a
    performant, simple logger, allowing for a log directory, opening
    multiple logs through its management facilities, and splitting
    upon dates. It also supports daemonization of the process
    utilizing it.
  ]],
  license = 'OWL',
  homepage = 'https://code.amlegion.org/lua-simplelog'
}
dependencies = {
  "lua >= 5.3"
}
build = {
  type = 'builtin',
  modules = {
    simplelog = 'simplelog.lua'
  }
}