There's a bunch of documentation on the
Log4j site including
short log4j manual. Your questions seem simple, but some background is needed.
The Category has been replaced by Logger (Category is deprecated), but lots of teams are still using Category. In code, a Logger/Category is used to log debug, error (etc.) messages, see code snippet in which I assume log4j is configured by a properties or xml file.
When Loggers are obtained using the fully qualified class name (e.g. using Logger.getLogger(MyClass.class)) then there is an implied hierarchy of Loggers based on the package name. There are other ways to name Loggers, but this is a common one.
You have probably seen that in your configuration file a category (aka Logger) can be configured/controlled as an implied logger, meaning you create Loggers for these:
com.myweb.dao.MyClass
com.myweb.dao.AnotherClass
and can configure these implied Loggers (implied because you didn't create a Logger with Logger.getLogger("com.myweb.dao") or Logger.getLogger("com.myweb") :
com.myweb.dao
or com.myweb
From log4j manual, the Logger hierarchy uses dot notation:
Loggers are named entities. Logger names are case-sensitive and they follow the hierarchical naming rule:
Named Hierarchy
A logger is said to be an ancestor of another logger if its name followed by a dot is a prefix of the descendant logger name. A logger is said to be a parent of a child logger if there are no ancestors between itself and the descendant logger.
As you indicated appenders can be associated with Categories/Loggers (also check out the root logger/category), usually using the hierarchy. The level (error, warn, debug, etc) of messages can be controlled by the Logger and/or Appender configuration.
Still have questions? Read some of the documentation and then come back here and ask for clarification.