change description
This commit is contained in:
parent
0e7ee82265
commit
dd68352dd3
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v0.3.0](https://git.zhirov.kz/dlang/singlog/compare/v0.2.1...v0.3.0) (2023.04.28)
|
||||||
|
|
||||||
|
### New
|
||||||
|
|
||||||
|
- Windows OS Logging support
|
||||||
|
|
||||||
## [v0.2.1](https://git.zhirov.kz/dlang/singlog/compare/v0.2.0...v0.2.1) (2023.03.29)
|
## [v0.2.1](https://git.zhirov.kz/dlang/singlog/compare/v0.2.0...v0.2.1) (2023.03.29)
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
|
13
README.md
13
README.md
|
@ -4,6 +4,8 @@
|
||||||
[![main](https://img.shields.io/badge/dynamic/json.svg?label=git.zhirov.kz&style=for-the-badge&url=https://git.zhirov.kz/api/v1/repos/dlang/singlog/tags&query=$[0].name&color=violet)](https://git.zhirov.kz/dlang/singlog)
|
[![main](https://img.shields.io/badge/dynamic/json.svg?label=git.zhirov.kz&style=for-the-badge&url=https://git.zhirov.kz/api/v1/repos/dlang/singlog/tags&query=$[0].name&color=violet)](https://git.zhirov.kz/dlang/singlog)
|
||||||
[![githab](https://img.shields.io/github/v/tag/AlexanderZhirov/singlog.svg?sort=semver&style=for-the-badge&color=blue&label=github)](https://github.com/AlexanderZhirov/singlog)
|
[![githab](https://img.shields.io/github/v/tag/AlexanderZhirov/singlog.svg?sort=semver&style=for-the-badge&color=blue&label=github)](https://github.com/AlexanderZhirov/singlog)
|
||||||
[![dub](https://img.shields.io/dub/v/singlog.svg?sort=semver&style=for-the-badge&color=orange)](https://code.dlang.org/packages/singlog)
|
[![dub](https://img.shields.io/dub/v/singlog.svg?sort=semver&style=for-the-badge&color=orange)](https://code.dlang.org/packages/singlog)
|
||||||
|
[![linux](https://img.shields.io/badge/Linux-FCC624?style=for-the-badge&logo=linux&logoColor=black)](https://www.linux.org/)
|
||||||
|
[![windows](https://img.shields.io/badge/Windows-0078D6?style=for-the-badge&logo=windows&logoColor=white)](https://support.microsoft.com/en-US/windows)
|
||||||
|
|
||||||
Singleton for simple logging
|
Singleton for simple logging
|
||||||
|
|
||||||
|
@ -25,6 +27,12 @@ void main()
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
Setting the name of the logged program (it matters for Windows OS):
|
||||||
|
|
||||||
|
```d
|
||||||
|
log.name("My program");
|
||||||
|
```
|
||||||
|
|
||||||
Setting the error output level:
|
Setting the error output level:
|
||||||
|
|
||||||
```d
|
```d
|
||||||
|
@ -42,7 +50,6 @@ Assigning a target output:
|
||||||
```d
|
```d
|
||||||
log.output(log.SYSLOG);
|
log.output(log.SYSLOG);
|
||||||
log.output(log.STDOUT);
|
log.output(log.STDOUT);
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Setup and allowing writing to a file:
|
Setup and allowing writing to a file:
|
||||||
|
@ -64,6 +71,6 @@ log.i("Information message") => log.information("Information message");
|
||||||
log.d("Debugging message") => log.debugging("Debugging message");
|
log.d("Debugging message") => log.debugging("Debugging message");
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dub
|
## DUB
|
||||||
|
|
||||||
Add a dependency on `"singlog": "~>0.2.1"`.
|
Add a dependency on `"singlog": "~>0.3.0"`.
|
||||||
|
|
|
@ -18,6 +18,8 @@ alias log = Log.msg;
|
||||||
Singleton for simple logging
|
Singleton for simple logging
|
||||||
|
|
||||||
---
|
---
|
||||||
|
// Setting the name of the logged program
|
||||||
|
log.name("My program");
|
||||||
// Setting the error output level
|
// Setting the error output level
|
||||||
log.level(log.DEBUG);
|
log.level(log.DEBUG);
|
||||||
log.level(log.ALERT);
|
log.level(log.ALERT);
|
||||||
|
@ -32,8 +34,6 @@ alias log = Log.msg;
|
||||||
log.output(log.FILE);
|
log.output(log.FILE);
|
||||||
// Setup and allowing writing to a file
|
// Setup and allowing writing to a file
|
||||||
log.file("./file.log");
|
log.file("./file.log");
|
||||||
log.fileOn();
|
|
||||||
log.fileOff();
|
|
||||||
// Output of messages to the log
|
// Output of messages to the log
|
||||||
log.alert("Alert message");
|
log.alert("Alert message");
|
||||||
log.critical("Critical message");
|
log.critical("Critical message");
|
||||||
|
|
Loading…
Reference in New Issue