public static void setLogger (Logger logger, Level level)

Sets the logging object that is used by SyncProvider implementations provided by the SyncFactory SPI. All SyncProvider implementations can log their events to this object and the application can retrieve a handle to this object using the getLogger method.

This method checks to see that there is an SQLPermission object which grants the permission setSyncFactory before allowing the method to succeed. If a SecurityManager exists and its checkPermission method denies calling setLogger, this method throws a java.lang.SecurityException.

Parameters:
logger    a Logger object instance
level    a Level object instance indicating the degree of logging required

Exceptions:
java.lang.SecurityException    if a security manager exists and its checkPermission method denies calling setLogger
NullPointerException    if the logger is null

See also:
SecurityManager.checkPermission, LoggingPermission