是否可以使用log4go将不同种类的日志记录到其他位置?

I noticed log4go has the filter mechanism. But it's based on level. That is, logs above certain level goes to certain filter. What I want to achieve is, for example, we have two types of logs, sheep and goat, each with all the levels DEBUG, INFO etc, log of type sheep go to sheep.log, log of type goat goes to goat.log. Is it possible using log4go?

Not directly, since the Filter struct which is set by AddFilter(name string, lvl Level, writer LogWriter) only filters on the log level, without consideration of "type".

You would have to extend that filter in order to add the "type".