Giter VIP home page Giter VIP logo

Comments (1)

lucasmarshall avatar lucasmarshall commented on May 20, 2024

This is now available on main, to be included in the 0.2.0 release:

supaglue syncs logs

You can list all logs in the system using the supaglue syncs logs command. The output is ndjson, with the following fields:

  • timestamp: an ISO 8601 UTC datetime specifying when the sync was run
  • syncConfigName: the sync config name for the sync
  • customerId: the ID of the customer the sync is running for
  • status: either "success" on successful sync or "error" if an error occurred, and
  • errorMessage: if there was an error, what the error message was
$ supaglue syncs logs
{"timestamp":"2023-02-09T18:15:24.027Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:15:24.021Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:00:00.360Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:00:00.348Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T02:00:00.337Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T02:00:00.311Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:45:00.229Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:45:00.220Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:30:00.275Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:30:00.260Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:15:00.260Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:15:00.188Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:45:00.350Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:45:00.194Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:30:00.281Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:30:00.270Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:15:00.266Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:15:00.252Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:00:00.296Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T23:00:00.286Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T22:45:00.273Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T22:45:00.263Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T22:30:00.231Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T22:30:00.227Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T21:00:21.022Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T21:00:21.015Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T20:45:00.378Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T20:45:00.203Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:45:00.224Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:45:00.218Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:30:00.543Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:30:00.220Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:15:00.198Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T19:15:00.191Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:45:00.252Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:45:00.247Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:30:00.320Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:30:00.298Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:15:00.320Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:15:00.313Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:00:00.697Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T18:00:00.684Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:45:00.280Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:45:00.276Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:30:00.263Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:30:00.259Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:15:00.252Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:15:00.239Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-08T00:00:00.287Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-07T23:45:00.278Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-07T22:09:11.879Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-07T22:09:06.781Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-07T21:28:11.932Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:39:13.152Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:37:17.238Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:36:51.217Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:36:11.809Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:32:40.640Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:30:24.444Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:29:40.444Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:22:21.292Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:20:47.008Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}

Since by default this outputs all logs, you probably want to limit it a bit. You can limit the number of log lines that are output via the (--limit) flag:

$ supaglue syncs logs --limit 10
{"timestamp":"2023-02-09T18:15:24.027Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:15:24.021Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:00:00.360Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T18:00:00.348Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T02:00:00.337Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T02:00:00.311Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:45:00.229Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:45:00.220Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:30:00.275Z","syncConfigName":"Opportunities","customerId":"user1","status":"success"}
{"timestamp":"2023-02-09T00:30:00.260Z","syncConfigName":"Contacts","customerId":"user1","status":"success"}

Logs also can be filtered using flags to show only logs from a particular customer ID (--customer-id), status (--status), sync config name (--sync-config-name), or any combination of these flags (including --limit)

$ yarn supaglue syncs logs --status error --limit 5
{"timestamp":"2023-02-07T21:28:11.932Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:39:13.152Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:37:17.238Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:36:51.217Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}
{"timestamp":"2023-02-07T20:36:11.809Z","syncConfigName":"Contacts","customerId":"user1","status":"error","errorMessage":"Sample error"}

supaglue syncs resume

If you determine that what caused a customer's sync to fail has been resolved, you can manually resume the sync via the supaglue syncs resume command. This command requires two flags:

  • --customer-id: used to specify which of your customer to resume a sync for, and
  • --sync-config-name: used to specify which of the cutomer's syncs to resume
$ supaglue syncs resume --customer-id user1 --sync-config-name Opportunities
ℹ Info: Sync Opportunities for customer user1 resumed

from supaglue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.