Skip to content

Commit

Permalink
docs: v1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangfuxing committed Nov 11, 2024
1 parent 7c913ef commit 3bcafeb
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 325 deletions.
35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# deno-logger

[![NPM Version](https://img.shields.io/npm/v/@denodnt/logger.svg?style=flat)](https://www.npmjs.org/package/@denodnt/logger)
[![JSR Version](https://jsr.io/badges/@deno-lib/logger)](https://jsr.io/@deno-lib/logger)
[![JSR Version](https://jsr.io/badges/@deno-library/logger)](https://jsr.io/@deno-library/logger)

Deno / NodeJS colorful logger colorful logger

Expand All @@ -12,7 +12,9 @@ For Deno usage refer to [deno-logger doc](https://deno.land/x/logger)
### console logger

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();

Expand All @@ -24,7 +26,9 @@ logger.error("i am from consoleLogger", new Error("test"));
### file and console logger

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();

Expand All @@ -44,7 +48,9 @@ logger.error("i am from fileLogger", new Error("test"));
### file logger only

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();
await logger.initFileLogger("../log");
Expand All @@ -70,7 +76,10 @@ interface fileLoggerOptions {
example

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();

// cut by day
Expand Down Expand Up @@ -158,7 +167,9 @@ await logger.initFileLogger("../log", {
## disableConsole and enableConsole

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();

Expand All @@ -175,7 +186,9 @@ logger.info("console enabled, you can see me");
## disableFile and enableFile

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();
await logger.initFileLogger("../log");
Expand All @@ -202,7 +215,9 @@ example:
3. fileLogger, consoleLogger => disable => enable => fileLogger, consoleLogger

```js
import Logger from "https://deno.land/x/[email protected]/logger.ts";
import { Logger } from "jsr:@deno-library/logger";
// or
// import Logger from "https://deno.land/x/[email protected]/logger.ts";

const logger = new Logger();
await logger.initFileLogger("../log");
Expand Down Expand Up @@ -249,9 +264,9 @@ await build({
},
// map your favorite deno logger to its npm port.
mappings: {
"https://deno.land/x/[email protected].6/logger.ts": {
"https://deno.land/x/[email protected].7/logger.ts": {
name: "@denodnt/logger",
version: "1.1.6",
version: "1.1.7",
peerDependency: false,
},
},
Expand Down
2 changes: 1 addition & 1 deletion _updateMod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (readmeContent !== readmeContentOriginal) {

readmeContent = readmeContent.replaceAll(
/https:\/\/deno.land\/x\/logger@v[\d.]+\/logger.ts/g,
`jsr:@deno-lib/logger@${jsonConf.version}/logger`,
`jsr:@deno-library/logger@${jsonConf.version}`,
);

// Write the updated content back to the mod.ts file
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### v1.1.7 - 2024.11.11

- [Update the used deno API](https://github.com/deno-library/logger/pull/17)
- move from `deno-lib/logger` to `deno-library/logger`

### v1.1.6 - 2024.05.17

Expand Down
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@deno-lib/logger",
"name": "@deno-library/logger",
"version": "1.1.7",
"exports": "./mod.ts",
"tasks": {
Expand Down
Loading

0 comments on commit 3bcafeb

Please sign in to comment.