Skip to content

Commit

Permalink
logger
Browse files Browse the repository at this point in the history
  • Loading branch information
izzat5233 committed May 22, 2023
1 parent 1e98e61 commit d6a6e47
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
41 changes: 19 additions & 22 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package stu.najah.se.ui.control;

import stu.najah.se.core.service.aya.Logger;

import java.util.Scanner;

public class LogoutController {
Expand All @@ -15,11 +17,11 @@ public static void main(String[] args) {
while (true) {

if (loggedIn) {
System.out.println("You are logged in.");
System.out.println("Press 'l' to log out, or any other key to continue.");
Logger.print("You are logged in.");
Logger.print("Press 'l' to log out, or any other key to continue.");
} else {
System.out.println("You are logged out.");
System.out.println("Press 'l' to log in, or any other key to continue.");
Logger.print("You are logged out.");
Logger.print("Press 'l' to log in, or any other key to continue.");
}


Expand All @@ -29,12 +31,12 @@ public static void main(String[] args) {
if (input.equals("l")) {
loggedIn = !loggedIn; // toggle logged in status
} else {
System.out.println("Continuing...");
Logger.print("Continuing...");
}


if (!loggedIn) {
System.out.println("You are now logged out.");
Logger.print("You are now logged out.");
break;
}
}
Expand All @@ -43,4 +45,3 @@ public static void main(String[] args) {
scanner.close();
}
}

0 comments on commit d6a6e47

Please sign in to comment.