Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martindsouza committed Jun 19, 2017
1 parent e115449 commit 600f0c4
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 204 deletions.
26 changes: 13 additions & 13 deletions docs/Change Logs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This page contains all of Logger's Change Logs. Starting in version 3.0.0 onwards, only major tickets will be listed here. To see a complete list of all the issues for each version, review the appropriate release page.

<a name="change-log-3.1.1"></a>
##Change Log 3.1.1
## Change Log 3.1.1
[Download](https://github.com/OraOpenSource/Logger/raw/master/releases/logger_3.1.1.zip)<br/>
[Release Page](https://github.com/OraOpenSource/Logger/issues?utf8=%E2%9C%93&q=milestone%3A%22Release+3.1.1%22)<br/>
Release Articles
Expand All @@ -20,7 +20,7 @@ Release Articles
</table>

<a name="change-log-3.1.0"></a>
##Change Log 3.1.0
## Change Log 3.1.0
[Download](https://github.com/OraOpenSource/Logger/raw/master/releases/logger_3.1.0.zip)<br/>
[Release Page](https://github.com/OraOpenSource/Logger/issues?utf8=%E2%9C%93&q=milestone%3A%22Release+3.1.0%22+)<br/>
Release Articles
Expand Down Expand Up @@ -91,7 +91,7 @@ Release Articles


<a name="change-log-3.0.0"></a>
##Change Log 3.0.0
## Change Log 3.0.0
[Download](https://github.com/OraOpenSource/Logger/raw/master/releases/logger_3.0.0.zip)<br/>
[Release Page](https://github.com/OraOpenSource/Logger/issues?q=milestone%3A%22Release+3.0.0%22+)<br/>
Release Articles
Expand Down Expand Up @@ -189,7 +189,7 @@ Release Articles
</table>

<a name="change-log-2.1.2"></a>
##Change Log 2.1.2
## Change Log 2.1.2
[Download](https://github.com/oraopensource/logger/tree/master/releases/2.1.2)<br/>
[Release Page](https://github.com/oraopensource/logger/issues?milestone=6&state=closed)<br/>

Expand All @@ -213,7 +213,7 @@ Release Articles
</table>

<a name="change-log-2.1.1"></a>
##Change Log 2.1.1
## Change Log 2.1.1
[Download](https://github.com/oraopensource/logger/tree/master/releases/2.1.1)<br/>
[Release Page](https://github.com/oraopensource/logger/issues?milestone=5&state=closed)<br/>

Expand All @@ -232,7 +232,7 @@ Release Articles


<a name="change-log-2.1.0"></a>
##Change Log 2.1.0
## Change Log 2.1.0
[Download](https://github.com/oraopensource/logger/tree/master/releases/2.1.0)<br/>
[Release Page](https://github.com/oraopensource/logger/issues?milestone=3&state=closed)<br/>
Release Articles
Expand Down Expand Up @@ -289,7 +289,7 @@ Release Articles
</table>

<a name="change-log-2.0.0"></a>
##Change Log 2.0.0
## Change Log 2.0.0
[Download](https://github.com/oraopensource/logger/tree/master/releases/2.0.0)<br/>
[Release Page](https://github.com/oraopensource/logger/issues?milestone=1&state=closed)<br/>
Release Articles
Expand Down Expand Up @@ -326,7 +326,7 @@ Release Articles
</table>

<a name="change-log-1.4.0"></a>
##Change Log 1.4.0
## Change Log 1.4.0
[Download](https://github.com/oraopensource/logger/tree/master/releases/1.4.0)

<table border="0">
Expand All @@ -349,7 +349,7 @@ Release Articles


<a name="change-log-1.3.0"></a>
##Change Log 1.3.0
## Change Log 1.3.0
[Download](https://github.com/oraopensource/logger/tree/master/releases/1.3.0)

<table border="0">
Expand All @@ -371,7 +371,7 @@ Release Articles
</table>

<a name="change-log-1.2.2"></a>
##Change Log 1.2.2
## Change Log 1.2.2

<table border="0">
<tr>
Expand All @@ -392,7 +392,7 @@ Release Articles
</table>

<a name="change-log-1.2.0"></a>
##Change Log 1.2.0
## Change Log 1.2.0
[Download](https://github.com/oraopensource/logger/tree/master/releases/1.2.0)

<table border="0">
Expand Down Expand Up @@ -439,10 +439,10 @@ Release Articles
</table>


#Template (ignore)
# Template (ignore)

<a name="change-log-TODOVERSION"></a>
##Change Log TODOVERSION
## Change Log TODOVERSION
[Download](TODO_URL)<br/>
[Release Page](TODO_URL)<br/>
Release Articles
Expand Down
22 changes: 11 additions & 11 deletions docs/Development Guide.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
***This document is best viewed in [flatdoc format](http://oraopensource.github.io/flatdoc?repo=logger&path=docs%2FDevelopment+Guide.md)***
#Logger Developer Guide
This document describes how to develop and build Logger.
# Logger Developer Guide
This document describes how to develop and build Logger.

#Developing
# Developing
When developing with Logger you should work on the main source files, but never in the `releases` folder. The content in there is automatically generated as part of the [build process](#build-process).

##Conditional Compilation
## Conditional Compilation
Logger uses [conditional compilation](http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#LNPLS00210) to enable/disable features. It is highly recommended that you understand how conditional compilation works before working on Logger.

When installing Logger, the `plsql_ccflags` are automatically defined in the `logger_configure` procedure. It is not reasonable to constantly run `logger_configure` after each change to the source code.

An easy way to control the `plsql_ccflags` is manually set them in your current session. This will allow you to quickly test various situations. The following is an example of how to set your session's conditional compilation flags:
An easy way to control the `plsql_ccflags` is manually set them in your current session. This will allow you to quickly test various situations. The following is an example of how to set your session's conditional compilation flags:

```sql
alter session set plsql_ccflags = 'no_op:false, logger_debug:true, APEX:true, logger_plugin_error: true';
```

##Tables
## Tables
Logger has one installation script that will either update or install Logger. Because of this notion, any changes to tables must assume that the user can re-run the build script at any time and it will not fail.

A good example of this, is when adding a new column to a table. The script will check if that column exists. The column will be created only if it does not currently exist.

###$$logger_debug PLSQL_CCFLAG
### $$logger_debug PLSQL_CCFLAG
They're some times when you want to debug some code in Logger. There is a catch since you may not want to use Logger to test. Instead, you can add `dbms_output.put_line` statements. If you do add any debug code be sure to wrap in the conditional compilation flag `logger_debug`. Example:

```sql
Expand All @@ -33,7 +33,7 @@ $end
...
```

###$$no_op
### $$no_op
Logger supports the concept of a `no_op` build. For various reasons, primarily performance releated, you may not want to run Logger on a production system. The `no_op` version allows all the references to Logger however nothing will be executed since each method either returns a minimal result or the procedure is just one `null;` statement.

If developing a new method you must support the `no_op` conditional compilation flag. For examples, look at any of the existing methods.
Expand All @@ -43,15 +43,15 @@ When [building](#build-process) a version of logger the `logger_no_op.pkb` insta
The generated version of `logger_no_op.pkb` is stored in `source/packages/` and then the build script copies the file over to the `releases` folder as part of the build. There is no need to commit `logger_no_op.pkb` to Git for version control. By default there is a reference to `source/packages/logger_no_op.pkb` in the `.gitignore` file to ignore this from Git checkins.


##Issues
## Issues
Unless an change is very small, please register an [issue](https://github.com/OraOpenSource/Logger/issues) for it in Github. This way it is easy to reference this issue in the code and we can keep track of all the features in a given release.


##Testing
## Testing
We plan to implement a test suite in the future which each build must pass in order to be certified.

<a href="build-process"></a>
#Building Logger
# Building Logger
Logger has a build script which will take all the source files and merge them into installation files in the `releases` folder. The following demonstrates how to build Logger:

```bash
Expand Down
42 changes: 21 additions & 21 deletions docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
- [Maintenance](#maintenance)

<a name="installation"></a>
#Installation
# Installation

If you're new to Logger it's recommended you simply [install into an existing schema](#install-into-existing-schema) on a development environment to get up and running as quickly as possible. You are encouraged to review the rest of the installation sections after you're more familiar with Logger. Once you are comfortable using Logger it is recommended that you read the [Best Practices](Best Practices.md) section

##Important Notes
## Important Notes

###Previous Installations
### Previous Installations
Version 2.0.0 build scripts were completely re-written to make it easier for future development. The new build scripts were built off Logger 1.4.0. As such, **if your current version is lower than 1.4.0 you need to run the uninstall script for your specific version**. If you're currently 1.4.0 or above the installation script will automatically update your current version. The following query will identify your current version.

```sql
Expand All @@ -21,11 +21,11 @@ where pref_name = 'LOGGER_VERSION';

To uninstall an older version of logger, see the [Uninstall](#uninstall) instructions. If necessary, you can download the correct version from the [releases](https://github.com/oraopensource/logger/tree/master/releases) folder.

###Install Through APEX
### Install Through APEX
Logger is no longer supported from a web-only installation if the schema was provisioned by APEX. Essentially the APEX team removed the "create any context" privilege when provisioning a new workspace, likely for security reasons. I agree with their choice, it unfortunately impacts logger.

<a name="install-into-new-schema"></a>
##Install into a new schema
## Install into a new schema

1. Using sql*plus or SQL Developer, connect to the database as system or a user with the DBA role.

Expand All @@ -41,7 +41,7 @@ Logger is no longer supported from a web-only installation if the schema was pro
1. Follow the steps to install into an existing schema (below).

<a name="install-into-existing-schema"></a>
##Install into an existing schema:
## Install into an existing schema:
1. If possible, connect as a privileged user and issue the following grants to your "existing_user":
```sql
grant connect,create view, create job, create table, create sequence,
Expand All @@ -55,10 +55,10 @@ create trigger, create procedure, create any context to existing_user;
1. Once installed, Logger is automatically set to **DEBUG** level. View the [configurations](#configuration) section to modify its settings.

<a name="install-no-op"></a>
##NO-OP Option for Production Environments
## NO-OP Option for Production Environments
To make sure there is no fear of leaving debug statements in production code, Logger comes with a [NO-OP](http://en.wikipedia.org/wiki/NOP) (No Operation) installation file (logger_no_op.sql). This installs only a shell of the Logger package. All procedures are essentially NO-OPs. It does not even create the tables so there is absolutely no chance it is doing any logging. It is recommended that you leave the full version installed and simply [set the Logger level](Logger API.md#procedure-set_level) to ERROR as the performance hit is exceptionally small.

##Objects
## Objects
The following database objects are installed with Logger:

```sql
Expand All @@ -81,15 +81,15 @@ LOGGER_GLOBAL_CTX CONTEXT -- Global Application Contexts are owned by SYS
```

<a name="uninstall"></a>
##Uninstall
## Uninstall
To uninstall Logger simple run the following script in the schema that Logger was installed in:

```sql
@drop_logger.sql
```

<a name="restrict-access"></a>
##Restrict Access (Grants & Synonyms)
## Restrict Access (Grants & Synonyms)
You may want to [install Logger into it's own schema](#install-into-new-schema) for various reasons. Some of the most common ones are:

- DBA does not want to give `CREATE ANY CONTEXT` access to your user.
Expand Down Expand Up @@ -118,19 +118,19 @@ Run as the user that needs to access Logger:


<a name="configuration"></a>
#Configuration
# Configuration

<a name="config-logger-levels"></a>
###Logger Levels
### Logger Levels
They're various logger levels. To see the complete list, go to the [Constants](Logger API.md#constants) section in the Logger API.

###Enable
### Enable
To enable logging for the entire schema:
```sql
exec logger.set_level(logger.g_debug);
```

###Disable
### Disable
To disable logging:
```sql
exec logger.set_level(logger.g_off);
Expand All @@ -145,10 +145,10 @@ If you never want logger to run in an environment you can install the [NO-OP](#i



###Client Specific Configuration
### Client Specific Configuration
Logger now supports client specific configuration. For more information and examples view the [Set Logging Level](Logger API.md#set-logging-level) section in the Logger API documentation.

###Status
### Status
To view the status/configuration of the Logger:

```sql
Expand All @@ -170,7 +170,7 @@ For all client info see : logger_prefs_by_client_id
PL/SQL procedure successfully completed.
```

###Preferences
### Preferences
Logger stores its configuration settings in LOGGER_PREFS. These are the following preferences:

<table border="0">
Expand Down Expand Up @@ -216,7 +216,7 @@ Logger stores its configuration settings in LOGGER_PREFS. These are the followin
</tr>
</table>

###Other Options
### Other Options

Once you perform the following described steps for the Flashback or APEX option, simply run the *logger_configure* procedure, then run *logger.status* to check validate your changes.

Expand All @@ -225,19 +225,19 @@ exec logger_configure;
exec logger.status;
```

####Flashback
#### Flashback
To enable this option, grant execute on *dbms_flashback* to the user that owns the logger packages. Every insert into *logger_logs* will include the SCN (System Commit Number). This allows you to flashback a session to the time when the error occurred to help debug it or even undo any data corruption. As SYS from sql*plus:

```sql
grant execute on dbms_flashback to logger;
```

####APEX
#### APEX
This option allows you to call logger.log_apex_items which grabs the names and values of all APEX items from the current session and stores them in the logger_logs_apex_items table. This is extremely useful in debugging APEX issues. This option is enabled automatically by logger_configure if APEX is installed in the database.


<a name="maintenance"></a>
#Maintenance
# Maintenance

By default, the DBMS\_SCHEDULER job "LOGGER\_PURGE\_JOB" runs every night at 1:00am and deletes any logs older than 7 days that are of error level *g_debug* or higher which includes *g_debug* and *g_timing*. This means logs with any lower level such as *g_error* or *g_permanent* will never be purged. You can also manually purge all logs using *logger.purge_all*, but this will not delete logs of error level *g_permanent*.

Expand Down
10 changes: 5 additions & 5 deletions docs/Logger API Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ This is a snippet template to quickly add documentation to the Logger API librar
- [TODO_PROC_NAME](#procedure-TODO_ANCHOR_LINK)

<a name="procedure-TODO_NAME"></a>
####TODO_NAME
#### TODO_NAME
TODO_DESC

#####Syntax
##### Syntax
```sql
TODO
```

#####Parameters
##### Parameters
<table border="0">
<tr>
<th>Attribute</th>
Expand Down Expand Up @@ -41,7 +41,7 @@ TODO
</tr>
</table>

#####Example
##### Example
```sql
TODO
```
```
Loading

0 comments on commit 600f0c4

Please sign in to comment.