A Project for Chronicle 4 based on L2JServer.


    Incorrect log friend chat

    Share

    Flopix

    Posts : 16
    Join date : 2014-02-28

    Incorrect log friend chat

    Post  Flopix on 8th December 2015, 00:52

    Friend messages logged to main java console but not in the "chat.log" file.


    To fix:

    RequestSendFriendMsg.java
    Code:

    - private static Logger _logChat = Logger.getLogger(RequestSendFriendMsg.class.getName());
    + private static Logger _logChat = Logger.getLogger("chat");
    avatar
    DnR
    Admin
    Admin

    Posts : 1027
    Join date : 2012-12-03

    Re: Incorrect log friend chat

    Post  DnR on 8th December 2015, 12:22

    That's not a bug.
    Friend chat is already handled.

    Code:

            if (Config.LOG_CHAT)
            {
                LogRecord record = new LogRecord(Level.INFO, _message);
                record.setLoggerName("chat");
                record.setParameters(new Object[]{"PRIV_MSG", "[" + activeChar.getName() + " to "+ _receiver +"]"});
                _logChat.log(record);
            }

    Thanks.

      Current date/time is 18th December 2017, 05:14