Skip to content

Commit

Permalink
Remove AppVeyor (#1975)
Browse files Browse the repository at this point in the history
* removed appveyor.yml

* updated build status badge to point to GitHub Actions

* removed dead badge
  • Loading branch information
fearphage committed Dec 12, 2021
1 parent 77ea34c commit 1a3ff33
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 74 deletions.
92 changes: 47 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

A logger for just about everything.

[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://npmcharts.com/compare/winston?minimal=true)[![Build Status](https://img.shields.io/travis/winstonjs/winston/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston)[![Dependencies](https://img.shields.io/david/winstonjs/winston.svg?style=flat-square)](https://david-dm.org/winstonjs/winston)
[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)
[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://npmcharts.com/compare/winston?minimal=true)
[![build status](https://github.com/winstonjs/winston/actions/workflows/ci.yml/badge.svg)](https://github.com/winstonjs/winston/actions/workflows/ci.yml)

[![NPM](https://nodei.co/npm/winston.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston/)

Expand All @@ -15,7 +17,7 @@ PRs welcome!

## Looking for `winston@2.x` documentation?

Please note that the documentation below is for `winston@3`.
Please note that the documentation below is for `winston@3`.
[Read the `winston@2.x` documentation].

## Motivation
Expand All @@ -36,7 +38,7 @@ the API that they exposed to the programmer.

## Quick Start

TL;DR? Check out the [quick start example][quick-example] in `./examples/`.
TL;DR? Check out the [quick start example][quick-example] in `./examples/`.
There are a number of other examples in [`./examples/*.js`][examples].
Don't see an example you think should be there? Submit a pull request
to add it!
Expand Down Expand Up @@ -103,7 +105,7 @@ logger to use throughout your application if you so choose.
* [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston)
* [To Exit or Not to Exit](#to-exit-or-not-to-exit)
* [Rejections](#rejections)
* [Handling Uncaught Promise Rejections with winston](#handling-uncaught-promise-rejections-with-winston)
* [Handling Uncaught Promise Rejections with winston](#handling-uncaught-promise-rejections-with-winston)
* [Profiling](#profiling)
* [Streaming Logs](#streaming-logs)
* [Querying Logs](#querying-logs)
Expand All @@ -121,7 +123,7 @@ Logging levels in `winston` conform to the severity ordering specified by
from most important to least important._

``` js
const levels = {
const levels = {
error: 0,
warn: 1,
info: 2,
Expand All @@ -148,15 +150,15 @@ A logger accepts the following parameters:

| Name | Default | Description |
| ------------- | --------------------------- | --------------- |
| `level` | `'info'` | Log only if [`info.level`](#streams-objectmode-and-info-objects) less than or equal to this level |
| `level` | `'info'` | Log only if [`info.level`](#streams-objectmode-and-info-objects) less than or equal to this level |
| `levels` | `winston.config.npm.levels` | Levels (and colors) representing log priorities |
| `format` | `winston.format.json` | Formatting for `info` messages (see: [Formats]) |
| `transports` | `[]` _(No transports)_ | Set of logging targets for `info` messages |
| `exitOnError` | `true` | If false, handled exceptions will not cause `process.exit` |
| `silent` | `false` | If true, all logs are suppressed |

The levels provided to `createLogger` will be defined as convenience methods
on the `logger` returned.
on the `logger` returned.

``` js
//
Expand All @@ -170,7 +172,7 @@ logger.log({
logger.info('Hello again distributed logs');
```

You can add or remove transports from the `logger` once it has been provided
You can add or remove transports from the `logger` once it has been provided
to you from `winston.createLogger`:

``` js
Expand Down Expand Up @@ -227,15 +229,15 @@ const childLogger = logger.child({ requestId: '451' });

In `winston`, both `Logger` and `Transport` instances are treated as
[`objectMode`](https://nodejs.org/api/stream.html#stream_object_mode)
streams that accept an `info` object.
streams that accept an `info` object.

The `info` parameter provided to a given format represents a single log
message. The object itself is mutable. Every `info` must have at least the
`level` and `message` properties:

``` js
const info = {
level: 'info', // Level of the logging message
level: 'info', // Level of the logging message
message: 'Hey! Log something?' // Descriptive message being logged.
};
```
Expand All @@ -249,10 +251,10 @@ const { level, message, ...meta } = info;
Several of the formats in `logform` itself add additional properties:

| Property | Format added by | Description |
| ----------- | --------------- | ----------- |
| ----------- | --------------- | ----------- |
| `splat` | `splat()` | String interpolation splat for `%d %s`-style messages. |
| `timestamp` | `timestamp()` | timestamp the message was received. |
| `label` | `label()` | Custom label associated with each message. |
| `label` | `label()` | Custom label associated with each message. |
| `ms` | `ms()` | Number of milliseconds since the previous log message. |

As a consumer you may add whatever properties you wish – _internal state is
Expand Down Expand Up @@ -286,7 +288,7 @@ console.log(SPLAT === Symbol.for('splat'));
```

> **NOTE:** any `{ message }` property in a `meta` object provided will
> automatically be concatenated to any `msg` already provided: For
> automatically be concatenated to any `msg` already provided: For
> example the below will concatenate 'world' onto 'hello':
>
> ``` js
Expand Down Expand Up @@ -387,7 +389,7 @@ logger.log('info', 'test message %s, %s', 'first', 'second', { number: 123 });

### Filtering `info` Objects

If you wish to filter out a given `info` Object completely when logging then
If you wish to filter out a given `info` Object completely when logging then
simply return a falsey value.

``` js
Expand Down Expand Up @@ -436,19 +438,19 @@ const willNeverThrow = format.combine(

### Creating custom formats

Formats are prototypal objects (i.e. class instances) that define a single
Formats are prototypal objects (i.e. class instances) that define a single
method: `transform(info, opts)` and return the mutated `info`:

- `info`: an object representing the log message.
- `opts`: setting specific to the current instance of the format.

They are expected to return one of two things:

- **An `info` Object** representing the modified `info` argument. Object
references need not be preserved if immutability is preferred. All current
built-in formats consider `info` mutable, but [immutablejs] is being
- **An `info` Object** representing the modified `info` argument. Object
references need not be preserved if immutability is preferred. All current
built-in formats consider `info` mutable, but [immutablejs] is being
considered for future releases.
- **A falsey value** indicating that the `info` argument should be ignored by the
- **A falsey value** indicating that the `info` argument should be ignored by the
caller. (See: [Filtering `info` Objects](#filtering-info-objects)) below.

`winston.format` is designed to be as simple as possible. To define a new
Expand Down Expand Up @@ -506,14 +508,14 @@ corresponding integer priority. For example, as specified exactly in RFC5424
the `syslog` levels are prioritized from 0 to 7 (highest to lowest).

```js
{
emerg: 0,
alert: 1,
crit: 2,
error: 3,
warning: 4,
notice: 5,
info: 6,
{
emerg: 0,
alert: 1,
crit: 2,
error: 3,
warning: 4,
notice: 5,
info: 6,
debug: 7
}
```
Expand All @@ -522,14 +524,14 @@ Similarly, `npm` logging levels are prioritized from 0 to 6 (highest to
lowest):

``` js
{
error: 0,
warn: 1,
info: 2,
{
error: 0,
warn: 1,
info: 2,
http: 3,
verbose: 4,
debug: 5,
silly: 6
verbose: 4,
debug: 5,
silly: 6
}
```

Expand Down Expand Up @@ -643,10 +645,10 @@ winston aware of them:
winston.addColors(myCustomLevels.colors);
```

This enables loggers using the `colorize` formatter to appropriately color and style
This enables loggers using the `colorize` formatter to appropriately color and style
the output of custom levels.

Additionally, you can also change background color and font style.
Additionally, you can also change background color and font style.
For example,
``` js
baz: 'italic yellow',
Expand All @@ -655,15 +657,15 @@ foobar: 'bold red cyanBG'

Possible options are below.

* Font styles: `bold`, `dim`, `italic`, `underline`, `inverse`, `hidden`,
* Font styles: `bold`, `dim`, `italic`, `underline`, `inverse`, `hidden`,
`strikethrough`.

* Font foreground colors: `black`, `red`, `green`, `yellow`, `blue`, `magenta`,
`cyan`, `white`, `gray`, `grey`.

* Background colors: `blackBG`, `redBG`, `greenBG`, `yellowBG`, `blueBG`
`magentaBG`, `cyanBG`, `whiteBG`

### Colorizing Standard logging levels

To colorize the standard logging level add
Expand Down Expand Up @@ -731,7 +733,7 @@ module.exports = class YourCustomTransport extends Transport {
//
// Consume any custom options here. e.g.:
// - Connection information for databases
// - Authentication information for APIs (e.g. loggly, papertrail,
// - Authentication information for APIs (e.g. loggly, papertrail,
// logentries, etc.).
//
}
Expand Down Expand Up @@ -789,7 +791,7 @@ const { createLogger, transports } = require('winston');
// Enable exception handling when you create your logger.
const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
new transports.File({ filename: 'combined.log' })
],
exceptionHandlers: [
new transports.File({ filename: 'exceptions.log' })
Expand All @@ -799,7 +801,7 @@ const logger = createLogger({
// Or enable it later on by adding a transport or using `.exceptions.handle`
const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
new transports.File({ filename: 'combined.log' })
]
});

Expand Down Expand Up @@ -904,7 +906,7 @@ const { createLogger, transports } = require('winston');
// Enable rejection handling when you create your logger.
const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
new transports.File({ filename: 'combined.log' })
],
rejectionHandlers: [
new transports.File({ filename: 'rejections.log' })
Expand All @@ -914,7 +916,7 @@ const logger = createLogger({
// Or enable it later on by adding a transport or using `.rejections.handle`
const logger = createLogger({
transports: [
new transports.File({ filename: 'combined.log' })
new transports.File({ filename: 'combined.log' })
]
});

Expand Down Expand Up @@ -1193,7 +1195,7 @@ yarn add winston

## Run Tests

All of the winston tests are written with [`mocha`][mocha], [`nyc`][nyc], and
All of the winston tests are written with [`mocha`][mocha], [`nyc`][nyc], and
[`assume`][assume]. They can be run with `npm`.

``` bash
Expand All @@ -1219,7 +1221,7 @@ npm test
[logform]: https://github.com/winstonjs/logform#readme
[winston-transport]: https://github.com/winstonjs/winston-transport

[Read the `winston@2.x` documentation]: https://github.com/winstonjs/winston/tree/2.x
[Read the `winston@2.x` documentation]: https://github.com/winstonjs/winston/tree/2.x

[quick-example]: https://github.com/winstonjs/winston/blob/master/examples/quick-start.js
[examples]: https://github.com/winstonjs/winston/tree/master/examples
Expand Down
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

0 comments on commit 1a3ff33

Please sign in to comment.