017-003-004

Default and Static Methods: Logging Feature

Hard

Problem Description

Default and static Methods: Logging Feature

In this problem, you will create a program that defines default and static methods in a Logger interface, reads a log level and message from standard input, and displays them in a formatted log entry to standard output.

Learning Objective: Understand interface default and static methods

Define default and static methods in Logger interface and use them in implementing class.

Input

Line 1: Log level (info or warn)
Line 2: Message

Output

[PREFIX] [level]: [message]
Timestamp: [current time]
```java

## Example
Input:
```java
info
System started
```java
Output:
```java
[LOG] INFO: System started
Timestamp: current

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up