Git Product home page Git Product logo

scratch-cloud-logs's Introduction

Scratch Cloud API Logger

This project is a Node.js script designed to log changes to cloud variables using the Scratch Cloud API.

English / 日本語

Overview

This script connects to a Scratch project and logs real-time changes to cloud variables. The logs are saved in the cloud.log file.

Prerequisites

  • Node.js installed
  • config.js file configured with your project ID

Installation

npm install

Configuration

Set your Project ID in config.js file.

module.exports = {
    projectId: 'your_project_id_here'
};

Usage

Run the script.

npm start

Log File

Logs are saved in the cloud.log file. This file is not included in the Git repository.

Notes

Please adhere to Scratch's terms of use when using this script, as it utilizes the Scratch API.

npm start

Addons

Scratch Building

This add-on was created to simplify the monitoring of cloud data communication for Scratch Building games.

Log

You can monitor the communication of cloud data. Currently, the user verification feature is only supported for chat communication.

Log: logs/scratch-building.log Chat log: logs/scratch-building-chat.log

node addons/scratch-building/logs.js

Chat

You can chat specifying a username. While it's possible to impersonate the sender within the game, monitoring API communication allows you to identify whether the sender is the actual user. Therefore, using this feature is not recommended. We cannot take responsibility if using this feature disrupts gameplay.

node addons/scratch-building/chat.js <username>

Customizing Logs

You can customize the display by adjusting the LogFormat set in the configuration file addons/scratch-building/_config.js.

  • LogFormat: Defines the format for standard server logs, including color configurations.
  • LogFormatWarn: Specifies the format for warning logs, handling logs at a warning level.
  • LogFormat_noColor: Sets the format for logs without colors, excluding any color configurations.

Utilize these settings to tailor the content and presentation of your logs to your needs.

scratch-cloud-logs's People

Contributors

dependabot[bot] avatar fun117 avatar

Stargazers

 avatar

Watchers

 avatar

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.