Skip to content

Commit

Permalink
fix: use default logger in dptlib
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Apr 3, 2024
1 parent d3d8f09 commit 196a493
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/dptlib/dpt1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

const custom_truthiness = (value: string | boolean): boolean => {
const f = parseFloat(value as string)
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT10.*: time (3 bytes)
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt11.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger
//
// DPT11.*: date
//
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt14.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* knx.js - a KNX protocol stack in pure Javascript
* (C) 2016-2018 Elias Karakoulakis
*/
import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT14.*: 4-byte floating point value
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt16.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT16: ASCII string (max 14 chars)
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt18.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'
import { hasProp } from 'src/utils'

Expand All @@ -27,7 +27,7 @@ import { hasProp } from 'src/utils'

// TODO: implement fromBuffer, formatAPDU

const log = logger.get()
const log = logger

const config: DatapointConfig = {
id: 'DPT18',
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt19.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger
// TODO: implement fromBuffer, formatAPDU

//
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT20: 1-byte HVAC
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt21.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* knx.js - a KNX protocol stack in pure Javascript
* (C) 2016-2018 Elias Karakoulakis
*/
import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT21: 1-byte status
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt232.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2019 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT232: 3-byte RGB color array
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt237.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'
import { hasProp } from 'src/utils'

const log = logger.get()
const log = logger

//
// DPT237: 2-byte unsigned value
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt238.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT238: 1-byte unsigned value
Expand Down
4 changes: 2 additions & 2 deletions src/dptlib/dpt9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* (C) 2016-2018 Elias Karakoulakis
*/

import logger from '../KnxLog'
import { logger } from 'log-driver'
import type { DatapointConfig } from '.'

const log = logger.get()
const log = logger

//
// DPT9.*: 2-byte floating point value
Expand Down

0 comments on commit 196a493

Please sign in to comment.