Code Organization

A simple code project is typically organized with two sub-projects: one for code, and another for unit testing.

When we separate the logging from the rest of the code, we place the logic in the Functional Layer, and the logging into the Logging Layer. We also follow this pattern for the unit tests.

If the software is designed around Multitier Architecture then it may be laid out such that each tier has its own section, with multiple projects inside of each tier. The unit tests section will then have a similar pattern of tiers so that there is a clear mapping between the code and the corresponding unit tests:

Once again, the Logging Layer mirrors the Functional Layer:

Next: Basic Logging