Skip to content

@mega-yfue/eufy-sdk / Logger

Interface: Logger ​

Host-pluggable diagnostics sink. Pass one as logger when constructing EufyMega; the SDK calls the matching level method with a [subsystem]-prefixed message and optional args.

Example ​

ts
// A custom sink (or pass a tslog / winston instance directly — they already match this shape):
const eufy = new EufyMega({
  email,
  password,
  logger: { debug: (m, ...a) => myLog.debug(m, ...a), info: () => {}, warn: console.warn, error: console.error },
});

Methods ​

debug() ​

ts
debug(message, ...args): void;

Parameters ​

message ​

string

args ​

...unknown[]

Returns ​

void


error() ​

ts
error(message, ...args): void;

Parameters ​

message ​

string

args ​

...unknown[]

Returns ​

void


info() ​

ts
info(message, ...args): void;

Parameters ​

message ​

string

args ​

...unknown[]

Returns ​

void


warn() ​

ts
warn(message, ...args): void;

Parameters ​

message ​

string

args ​

...unknown[]

Returns ​

void

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.