Skip to content

Commit

Permalink
Consola del log desabilitada
Browse files Browse the repository at this point in the history
  • Loading branch information
Sacha1083 committed Feb 25, 2025
1 parent acd13db commit 9ce78ea
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 59 deletions.
108 changes: 54 additions & 54 deletions .idea/artifacts/registrationForm_jar.xml

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

7 changes: 3 additions & 4 deletions src/main/java/util/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import java.io.IOException;
import java.nio.file.Paths;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;
import java.util.logging.*;

public class Log {
private static final String LOG_DIR = Paths.get("").toAbsolutePath().toString();
Expand All @@ -15,6 +12,8 @@ public class Log {
static {
try {
logger = Logger.getLogger("AppLogger");
logger.setUseParentHandlers(false); // Disable console output

FileHandler fileHandler = new FileHandler(LOG_FILE, true);
fileHandler.setFormatter(new SimpleFormatter());
logger.addHandler(fileHandler);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/util/listeners/RegisterListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class RegisterListener extends Component implements ActionListener {
* @since JDK21.0.5
*/
public RegisterListener(View view, String option, JTextField name, JTextField eMail, JPasswordField password) {
System.out.println("LoginListener created");
Log.config("RegisterListener initialized");
this.view = view;
this.option = option;
this.name = name;
Expand Down

0 comments on commit 9ce78ea

Please sign in to comment.