• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

share / sharedb / 900 / 3
96%
master: 97%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 31 Oct 2018 10:41AM UTC
Files 24
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Oct 2018 10:33AM UTC coverage: 95.519% (-0.003%) from 95.522%
900.3

push

travis-ci

Alec Gibson
Use loglevel instead of console

The [`loglevel`][1] package is a drop-in replacement for `console`,
which lets us set the level of logging we wish to see.

This is particularly useful if we want to silence noisy logs (eg in
tests where we deliberately cause failures).

This change notably removes the `debug` flag from `Connection`.
Logging should be controlled through the provided interface (see below).

## Backend

The log level is controlled on the backend through the `Backend`
constructor. For example, to enable only errors:

```js
const Backend = require('sharedb');

const share = new Backend({
  logLevel: 'error',
});
```

## Client

The client-side log level can be set through a static method exposed on
the `Client`:

```js
const Client = require('sharedb/lib/client');

Client.setLogLevel('error');
```

[1]: https://github.com/pimterry/loglevel

1089 of 1307 branches covered (83.32%)

2302 of 2410 relevant lines covered (95.52%)

133.71 hits per line

Source Files on job 900.3
  • Tree
  • List 0
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 881
  • Travis Job 900.3
  • ca2719a1 on github
  • Prev Job for on use-loglevel (#899.1)
  • Next Job for on use-loglevel (#904.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc