1 | // Copyright (c) 2015 Uber Technologies, Inc.
|
2 | //
|
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
|
4 | // of this software and associated documentation files (the "Software"), to deal
|
5 | // in the Software without restriction, including without limitation the rights
|
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7 | // copies of the Software, and to permit persons to whom the Software is
|
8 | // furnished to do so, subject to the following conditions:
|
9 | //
|
10 | // The above copyright notice and this permission notice shall be included in
|
11 | // all copies or substantial portions of the Software.
|
12 | //
|
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19 | // THE SOFTWARE.
|
20 |
|
21 | ;
|
22 |
|
23 | var test = require('tape');
|
24 |
|
25 | var Logger = require('../logger.js');
|
26 |
|
27 | require('./default-backends.js');
|
28 | require('./circular-objects.js');
|
29 | require('./backend-without-destroy.js');
|
30 | require('./console-errors.js');
|
31 | require('./console.js');
|
32 | require('./errors-in-backend.js');
|
33 | require('./errors-with-all-backends.js');
|
34 | require('./file-errors.js');
|
35 | require('./file.js');
|
36 | require('./instrument.js');
|
37 | require('./kafka-errors.js');
|
38 | require('./kafka.js');
|
39 | require('./optional-backends.js');
|
40 | require('./pid-and-host.js');
|
41 | require('./sentry-errors.js');
|
42 | require('./sentry.js');
|
43 | require('./stats.js');
|
44 | require('./throws-assertions.js');
|
45 | require('./access.js');
|
46 | require('./leaky-backend-master.js');
|
47 | require('./kafka-is-disabled.js');
|
48 | require('./child-logger.js');
|
49 | require('./buffer-objects.js');
|
50 | require('./raw-logger.js');
|
51 | require('./writing-weird-meta-objects.js');
|
52 |
|
53 | test('removing levels', function t(assert) {
|
54 | var logger = Logger({
|
55 | backends: {},
|
56 | meta: {},
|
57 | levels: {
|
58 | trace: null
|
59 | }
|
60 | });
|
61 |
|
62 | assert.equal(logger.trace, undefined);
|
63 |
|
64 | assert.end();
|
65 | });
|