Skip to content

Create basic logging functions #1

Description

@ojasmaheshwari

Create 3 functions inside Logger class:-

  1. info()
    Takes in a string argument message and prints string in below format:-
    [INFO] message
  2. warn()
    Takes in a string argument message and prints string in below format:-
    [WARNING] message
  3. error()
    Takes in a string argument message and prints string in below format:-
    [ERROR] message

For eg:-


Code

Logger log;
log.info("Some information");
log.warn("Some warning");
log.error("Some error");

Expected Output:

[INFO] Some information
[WARNING] Some warning
[ERROR] Some error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions