Using example 1 you can only switch off debugging selectively, which means that you have to actively set a log level for each and every logging category that comes along. This is impractical and leads to costly debug strings being created even though the appenders filter them out. In most cases, the creation of the debug strings is costly and in the worst case contains bugs.
By using example 2 all debugging is disabled, but the appenders will allow debug messages to be output if they have been enabled for a category.
To enable VM summary performance debugging add the following: