# ps-logger

> ps-logger is a production grade logger, basically it is used for logging info,warning,error,silly,verbose and debug statements

Latest version **1.0.9** (published 2026-09-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install ps-logger
pnpm add ps-logger
yarn add ps-logger
bun add ps-logger
```

## Health

**Score 60/100 (C)** — status: active.

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2026-09-05 |
| First published | 2021-12-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | shivansh patel |
| Maintainers | thisis_shivanshpatel |
| Keywords | ps-logger, winston, logger, logging, logs, sysadmin, bunyan, pino, loglevel, tools, json, stream |

## Links

- npm: https://www.npmjs.com/package/ps-logger
- Repository: https://github.com/thisisshivanshpatel/ps-logger
- Homepage: https://github.com/thisisshivanshpatel/ps-logger#readme
- Issues: https://github.com/thisisshivanshpatel/ps-logger/issues
- npm.io page: https://npm.io/package/ps-logger

## 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

- 1.0.9 (latest) — 2026-09-05
- 1.0.8 — 2023-01-02
- 1.0.7 — 2022-12-31
- 1.0.6 — 2022-04-01
- 1.0.5 — 2022-04-01
- 1.0.4 — 2022-01-02
- 1.0.3 — 2021-12-31
- 1.0.2 — 2021-12-29
- 1.0.1 — 2021-12-28
- 1.0.0 — 2021-12-28

## README

# ps-logger

<img src="screenshots/ps-logger.PNG" alt="screenshot" height="200" width="600"/>

 
- [![Npm package total downloads](https://badgen.net/npm/dt/ps-logger)](https://npmjs.com/package/ps-logger)

- <a href="https://dev.to/imshivanshpatel" target="blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/devto.svg" alt="imshivanshpatel" height="30" width="40" /></a>
<a href="https://linkedin.com/in/shivansh-patel-4915b4171" target="blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/linked-in-alt.svg" alt="shivansh-patel-4915b4171" height="30" width="40" /></a>
<a href="https://instagram.com/programming_updates" target="blank"><img align="center" src="https://raw.githubusercontent.com/rahuldkjain/github-profile-readme-generator/master/src/images/icons/Social/instagram.svg" alt="programming_updates" height="30" width="40" /></a>
- ps-logger is a production grade logger for info, warning, error, silly, verbose, prompt, debug, and magenta messages, with file logging and scrolling terminal text support.

## More Products to checkout

<table>
	<tr>
		<td width="50%">
			<a href="https://chromewebstore.google.com/detail/Timez%20Timer%20%26%20Pomodoro/jpbjkgabibfagbhklibkeblgedgkbgei?utm_source=ext_app_menu"><img src="screenshots/clock128.png" alt="Timez Timer &amp; Pomodoro" width="96" height="96" /></a><br />
			<strong><a href="https://chromewebstore.google.com/detail/Timez%20Timer%20%26%20Pomodoro/jpbjkgabibfagbhklibkeblgedgkbgei?utm_source=ext_app_menu">Timez Timer &amp; Pomodoro</a></strong><br />
			<sub>"Timez Timer & Pomodoro" is a Chrome extension designed to enhance focus and productivity. Set multiple timers within the extension to break down your tasks, manage your time effectively, and achieve your goals. Additionally, you can use the Pomodoro feature to work and have a break in a more planned way</sub><br /><br />
			<a href="https://chromewebstore.google.com/detail/Timez%20Timer%20%26%20Pomodoro/jpbjkgabibfagbhklibkeblgedgkbgei?utm_source=ext_app_menu"><strong>Open &rarr;</strong></a>
		</td>
		<td width="50%">
			<a href="https://chromewebstore.google.com/detail/syncboard-clipboard-manag/pjkhiifckihkopcgelghofikbhdijcke"><img src="screenshots/Sync128.png" alt="Syncboard Clipboard Manager" width="96" height="96" /></a><br />
			<strong><a href="https://chromewebstore.google.com/detail/syncboard-clipboard-manag/pjkhiifckihkopcgelghofikbhdijcke">Syncboard Clipboard Manager</a></strong><br />
			<sub>SyncBoard is a powerful clipboard management extension that seamlessly syncs your clipboard data across all your devices. Effortlessly copy, organize, and access your clipboard history anywhere, boosting your productivity and ensuring you never lose important information.</sub><br /><br />
			<a href="https://chromewebstore.google.com/detail/syncboard-clipboard-manag/pjkhiifckihkopcgelghofikbhdijcke"><strong>Open &rarr;</strong></a>
		</td>
	</tr>
</table>


## **`File logger`** added

#### usage examples:-

```JAVASCRIPT
const logger=require('ps-logger');

logger.info("This is info")
logger.warn("This is warning");
logger.error("This is error");
logger.debug("This is debug");
logger.prompt("This is prompt");
logger.verbose("This is verbose");
logger.silly("This is silly");
logger.magenta("This message is magenta");
```

#### Scrolling terminal text

Use `scrollingText` to continuously scroll text across the terminal. The optional second argument sets the text color to one of the available `colorsObj` keys.

```javascript
logger.scrollingText("Your server is running", "cyan");
```

Available colors are `red`, `yellow`, `brightYellow`, `green`, `blue`, `magenta`, and `cyan`.


#### disabling or enabling color
- By default it is set to true,so you dont need to set it as true

```javascript
logger.setColor(false);
```


#### In TypeScript

```javascript
import {info} from "ps-logger";

info(`server is running on port ${port} `)
```

#### File Logging
```javascript
const { logToFile,info } = require("ps-logger");

// set it to `true` to log into the file

// second param is file name and it's optional if you don't pass file name then it will log into ps-logger.log file

logToFile(true,'todaysLog');


info("This will output into log file")
```

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