Skip to content

<<<<<<< HEAD

Logging Utilities

This project provides simple logging utilities in both Python and JavaScript. You can add, read, edit, and delete log entries using either language. All logs are stored in a file named log.txt in the same directory.


Python Logger

Requirements

  • Python 3.x (no external libraries required)

Installation

No installation is required for Python. Just ensure you have Python 3 installed.

Usage

  1. Place logger.py in your project directory.
  2. Run the logger with:
    python logger.py
    
  3. You will see a menu:
  4. Add log entry
  5. Read all log entries
  6. Edit a log entry
  7. Delete a log entry
  8. Exit
  9. Follow the prompts to manage your log entries interactively.

JavaScript Logger

Requirements

  • Node.js
  • readline-sync package (for interactive CLI)

Installation

  1. Place logger.js in your project directory.
  2. Install the required package (only needed once):
    npm install readline-sync
    

Usage

  1. Run the logger with:
    node logger.js
    
  2. You will see a menu:
  3. Add log entry
  4. Read all log entries
  5. Edit a log entry
  6. Delete a log entry
  7. Exit
  8. Follow the prompts to manage your log entries interactively.

Notes

  • Both loggers use the same log.txt file by default. If you use both in the same directory, they will operate on the same log file.
  • All functions are commented for clarity.

License

This project is open source and free to use.

Logging Utilities (NO API)

This utility does NOT use any external APIs. All logging is managed locally for learning and experimentation.

This project provides simple logging utilities in both Python and JavaScript. You can add, read, edit, and delete log entries using either language. All logs are stored in a file named log.txt in the same directory.

Features

  • Add, read, edit, and delete log entries
  • Works in both Python and Node.js
  • Interactive CLI menu
  • Beginner-friendly: All code is commented for learning

Requirements

  • Python 3.x (no external libraries required)
  • Node.js (for JavaScript version)
  • readline-sync package for Node.js:
    npm install readline-sync
    

Setup

  1. Clone or download this repository.
  2. For Python:
  3. Place logger.py in your project directory.
  4. For Node.js:
  5. Place logger.js in your project directory.
  6. Install the required package:
    npm install readline-sync
    

Usage Workflow (Step-by-Step)

  1. Run the logger:
  2. For Python:
    python logger.py
    
  3. For Node.js:
    node logger.js
    
  4. Follow the menu prompts to add, read, edit, or delete log entries.

No real market data is used. This is for learning only!

Educational Notes

  • No API: All logging is managed in Python or JavaScript, so you can see and modify the logic yourself.
  • How does it work? The code is structured with functions and file I/O, with comments explaining each step.
  • How can you extend it? Try adding timestamps, or exporting logs to CSV!

License

MIT

8944b09 (Initial commit: Comprehensive Python & JS Finance Utilities for Beginners (API & API-free, with detailed docs))