Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
loglevel-plugin-remote issue sending logs to my api

I'm using loglevel to generate logs from the frontend of a js app and sending them to my api on another app with loglevel-plugin-remote. I haven't changed anything, but I'm no longer seeing the logs on my other app and I see the request to my api is stuck on pending in the network tab. here's my log setup:

import log from 'loglevel';
import remote from 'loglevel-plugin-remote';

// log.enableAll();


const customPlain = log => ({
    message: log.message,
    level: log.level.label,
    stacktrace: log.stacktrace
})

remote.apply(log, {
    method: 'POST',
    level: 'debug',
    format: customPlain,
    url: process.env.LOG_API_ENDPOINT,
    stacktrace: {
        levels: ['debug', 'info', 'warn', 'error'],
        depth: 4,
    },
    timestamp: () => new Date().toISOString(),
    format: remote.plain
});

export default log;

in my frontend file I import log and just have these test logs.

   log.warn('warn testing from the frontend')
    log.error('error frontend');
    log.debug('debug front');
    log.info('info log')

this is my first time using loglevel but I've read through the docs and feel like my setup is okay. just not sure where to go from here. any advice or help is appreciated!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!