APISonar


sun.rmi.runtime.Log.log

> sun > rmi > runtime > Log > log
sun APIs rmi APIs runtime APIs Log APIs log APIs

Example 1
static final Log tcpLog = Log.getLog("sun.rmi.transport.tcp", "tcp",
        LogStream.parseLevel(AccessController.doPrivileged(
            (PrivilegedAction<String>) () -> System.getProperty("sun.rmi.transport.tcp.logLevel"))));

    private static void closeSocket(Socket sock) {
        try {
            if (tcpLog.isLoggable(Log.BRIEF)) {
                tcpLog.log(Log.BRIEF, "socket close: " + sock);
            }
            sock.close();
        } catch (IOException ex) {
            // eat exception
            if (tcpLog.isLoggable(Log.BRIEF)) {
                tcpLog.log(Log.BRIEF, "socket close throws: " + ex);
            }
        }
    }
Example 2
public static final Log callLog =
        Log.getLog("sun.rmi.server.call", "RMI", logCalls);

    private void logCall(Remote obj, Object method) {
        if (callLog.isLoggable(Log.VERBOSE)) {
            String clientHost;
            try {
                clientHost = getClientHost();
            } catch (ServerNotActiveException snae) {
                clientHost = "(local)"; // shouldn't happen
            }
            callLog.log(Log.VERBOSE, "[" + clientHost + ": " +
                              obj.getClass().getName() +
                              ref.getObjID().toString() + ": " +
                              method + "]");
        }
    }
Example 3
static final Log dgcLog = Log.getLog("sun.rmi.dgc", "dgc",
        LogStream.parseLevel(AccessController.doPrivileged(
            (PrivilegedAction<String>) () -> System.getProperty("sun.rmi.dgc.logLevel"))));

    public void clean(ObjID[] ids, long sequenceNum, VMID vmid, boolean strong)
    {
        for (ObjID id : ids) {
            if (dgcLog.isLoggable(Log.VERBOSE)) {
                dgcLog.log(Log.VERBOSE, "id = " + id +
                    ", vmid = " + vmid + ", strong = " + strong);
            }

            ObjectTable.unreferenced(id, sequenceNum, vmid, strong);
        }
    }
Example 4
private static ObjectInputFilter initRegistryFilter() {
        ObjectInputFilter filter = null;
        String props = System.getProperty(REGISTRY_FILTER_PROPNAME);
        if (props == null) {
            props = Security.getProperty(REGISTRY_FILTER_PROPNAME);
        }
        if (props != null) {
            filter = ObjectInputFilter.Config.createFilter2(props);
            Log regLog = Log.getLog("sun.rmi.registry", "registry", -1);
            if (regLog.isLoggable(Log.BRIEF)) {
                regLog.log(Log.BRIEF, "registryFilter = " + filter);
            }
        }
        return filter;
    }
Example 5
public static final Log clientCallLog =
        Log.getLog("sun.rmi.client.call", "RMI",
                   AccessController.doPrivileged(
                       new GetBooleanAction("sun.rmi.client.logCalls")));

    void logClientCall(Object obj, Object method) {
        clientCallLog.log(Log.VERBOSE, "outbound call: " +
            ref + " : " + obj.getClass().getName() +
            ref.getObjID().toString() + ": " + method);
    }
Example 6
static final Log tcpLog = Log.getLog("sun.rmi.transport.tcp", "tcp",
        LogStream.parseLevel(AccessController.doPrivileged(
            new GetPropertyAction("sun.rmi.transport.tcp.logLevel"))));

    TCPTransport(LinkedList<TCPEndpoint> epList)  {
        // assert ((epList.size() != null) && (epList.size() >= 1))
        this.epList = epList;
        if (tcpLog.isLoggable(Log.BRIEF)) {
            tcpLog.log(Log.BRIEF, "Version = " +
                TransportConstants.Version + ", ep = " + getEndpoint());
        }
    }