change description

This commit is contained in:
Alexander Zhirov 2023-04-27 23:53:45 +03:00
parent 0e7ee82265
commit dd68352dd3
3 changed files with 18 additions and 5 deletions

View File

@ -1,5 +1,11 @@
# 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)
### New

View File

@ -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)
[![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)
[![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
@ -25,6 +27,12 @@ void main()
## Examples
Setting the name of the logged program (it matters for Windows OS):
```d
log.name("My program");
```
Setting the error output level:
```d
@ -42,7 +50,6 @@ Assigning a target output:
```d
log.output(log.SYSLOG);
log.output(log.STDOUT);
```
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");
```
## Dub
## DUB
Add a dependency on `"singlog": "~>0.2.1"`.
Add a dependency on `"singlog": "~>0.3.0"`.

View File

@ -18,6 +18,8 @@ alias log = Log.msg;
Singleton for simple logging
---
// Setting the name of the logged program
log.name("My program");
// Setting the error output level
log.level(log.DEBUG);
log.level(log.ALERT);
@ -32,8 +34,6 @@ alias log = Log.msg;
log.output(log.FILE);
// Setup and allowing writing to a file
log.file("./file.log");
log.fileOn();
log.fileOff();
// Output of messages to the log
log.alert("Alert message");
log.critical("Critical message");