# @smake/log

> Typescript Module Template

Latest version **2.1.1** (published 2022-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @smake/log
pnpm add @smake/log
yarn add @smake/log
bun add @smake/log
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2022-04-08 |
| First published | 2021-11-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 2 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yu Chen |
| Maintainers | kuyoonjo |
| Keywords | typescript, generator, node, module, javascript, js |

## Links

- npm: https://www.npmjs.com/package/@smake/log
- Repository: https://github.com/kuyoonjo/smake-lib-log
- Homepage: https://github.com/kuyoonjo/smake-lib-log#readme
- Issues: https://github.com/kuyoonjo/smake-lib-log/issues
- npm.io page: https://npm.io/package/@smake/log

## Dependencies (2)

- [smake](https://npm.io/package/smake.md) ^1.0.0
- [@smake/queue](https://npm.io/package/@smake/queue.md) ^2.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 2.1.1 (latest) — 2022-04-08
- 2.1.0 — 2021-12-20
- 2.0.2 — 2021-12-16
- 2.0.1 — 2021-11-22

## README

# C++ Log Library
```c++
#include <ex/log.h>
#include <iostream>
#include <thread>

int main() {
  ex::log::init("test.log");
  ex::log::level = ex::log::Level::info;
  ex::log::rotate_max_size = 1024 * 10;
  ex::log::rotate_retain = 5;
  ex::log::print_file_line = false;
  ex::log::rotate_compress = true;
  ex::log::start();

  for (int i = 0; i < 10; ++i) {
    std::thread([]() {
      for (int j = 0;; ++j) {
        Logi(j);
        std::this_thread::sleep_for(10ms);
      }
    }).detach();
  }

  for (int i = 0; i < 500; ++i) {
    std::this_thread::sleep_for(10ms);
    ex::log::flush();
    std::cout << "flush: " << i << std::endl;
  }
  ex::log::close();
  std::this_thread::sleep_for(1s);
  return 0;
}
```

---
_Source: https://npm.io/package/@smake/log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
