​The Layer2 Cloud Connector creates a variety of messages about its activities during synchronization. These messages will at first be filtered by the current global log level. Any message that gets through to this filter will be handed to the logging subsystem NLog. NLog is a free logging framework used by the Layer2 Cloud Connector system to manage its logging activities.

Layer2 Cloud Connector Logging and Alerting

​By default, there will be one log file created for each connection. These files will be saved in the Logs subdirectory under the Layer2 Cloud Connecter data directory (usually here: C:\ProgramData\Layer2 Cloud Connector\Logs\) and they are named after the connection they belong to plus the .log extension. Also located in the Logs folder is the logging configuration file (Nlog.config). This file contains all logging-specific configuration settings and defines different log formats for the Connection Manager and the background Windows Service log files.

In the log configuration, file target is enabled by default. There are also example configurations for using the Windows Event Log, Email, or SQL databases.

More detailed information about how to configure NLog can be found in the NLog documentation at https://github.com/nlog/nlog/wiki.

Layer2 Cloud Connector Log to Windows Event Log

​To configure the Layer2 Cloud Connector for logging into the Windows Event Log, a target section in the log configuration file needs to be created, similar to the following.


<target xsi:type="EventLog"
 name="EventLogTarget"
 layout="${message}"
 source="Layer2 Cloud Connector"
 log="Application" />

xsi:type
Defines the type of target to log to. For the Windows Event Log this needs to be “EventLog”, but there is a variety of different target types to use. The NLog documentation can be referred for a complete reference.

name
This attribute contains the name of the target to reference it in the rules configuration.

layout
This defines the layout of the log message to be written to the event log. It can contain several placeholders of the format ${placeholderName}. The NLog documentation can be referred for a complete reference.

source
The name of the source to appear in the Windows Event Log.

log
The name of the event log to write to.

IMPORTANT: To make the new target work, it is necessary to define a logging rule in the configuration similar to the following. This is placed in the bottom section for <rules>.
 
<rule minlevel="Warn"
name="*"
writeTo="EventLogTarget" />

Layer2 Cloud Connector Email Alert Configuration

​To configure the Layer2 Cloud Connector for sending e-mails for specific log-messages, a target section in the log-configuration file needs to be created, similar to the following.


<target xsi:type="Mail" 
 name="MailTarget"
 subject="Synchronization Error"
 body="${message}"
 from="[email protected]"
 to="[email protected]"
 smtpUserName="[email protected]"
 smtpPassword="myPassword"
 smtpAuthentication="Basic"
 smtpServer="mail.myCompany.com" />

xsi:type

Defines the type of target to log to. For mail alerts this needs to be “Mail”, but there is a variety of different target-types to use. The NLog documentation can be referred for a complete reference.

name
This attribute contains the name of the target to reference it in the rules configuration.

subject
This defines the subject of the mail alert. It can contain several placeholders of the format ${placeholderName}. The NLog documentation can be referred for a complete reference.

body
This defines the body-text of the mail alert. It can contain several placeholders of the format ${placeholderName}. The NLog documentation can be referred for a complete reference.
from
This attribute contains the email address of the sender.

to
This attribute contains the email addresses of the receipients, separated by semicolons.

smtpUserName and smtpPassword
These settings specify the account on the mail-server to be used to send the email alert.

smtpAuthentication
Defines the authentication mode to use when authenticating against the SMTP-mailserver. It can be one of the following:
     None
     Anonymous access to the mailserver. Username and password is not necessary with this setting.

     Basic
     Basic username and password authentication.

     Ntlm
     NTLM-Authentication. Username and password is not necessary with this setting.
 
If your email client also requires SSL connection to allow you to send mail, you may also need to include the parameter:
enableSsl="true"
 
 
IMPORTANT: To make the new target work, it is necessary to define a logging rule in the configuration similar to the following. This is placed in the bottom section for <rules>.

<logger minlevel="Error"
name="*"
writeTo="MailTarget" />

Layer2 Cloud Connector Log to SQL Databases

Please use the example Database target that is given in the Nlog.config file (usually located here: C:\ProgramData\Layer2 Cloud Connector\Logs\Nlog.config). This has the correct formatting to ensure all logs are passed to SQL without syntax errors.

To use a database target, a connection string must be edited and a target table must be created.The required SQL script to create an appropriate table called "CloudConnectorLogs" is also placed in the configuration file as a comment. The NLog documentation can be used for a complete reference.

 
IMPORTANT: To make the new target work, it is necessary to define a logging rule in the configuration similar to the following. This is placed in the bottom section for <rules>.

<logger minlevel="Warn"
name="*"
writeTo="SqlTarget" />

Known Issues and Troubleshooting Information

​Cloud Connector versions prior to 6.3.7.0 had the following two known issues with logging. To address these, please update your installation to 6.3.7.0 or higher:

  • Users with mail clients that required SSL connection could not user Nlog to forward email alerts as the enableSsl parameter was not yet available.
  • Users forwarding alerts to SQL may not get all alerts into the database due to a syntax issue.

The Layer2 Cloud Connector service does not pick up on logging changes (either Global Logging Level or customizations to the Nlog.config file) until the service is restarted.

NLog has its own internal logging that can be used to troubleshoot (more information regarding this feature, see the NLog Documentation). You need to add the following to the <nlog> node to enable it, where <path> equals a location on the host machine that the log file will be written to:

<xml version="1.0" encoding="utf-8"?>
<configuration>
<nlog internalLogFile="<path>" internalLogLevel="Trace"​>​

Share this site on Xing
Share this site on Google+
Share this site on LinkedIn

I am thoroughly impressed with your Cloud Connector software. It is an excellent concept, has extremely comprehensive functionality and is easy to configure.

Contact
Frank Daske

Frank Daske

Business Development Manager
+49 (0) 40 28 41 12 - 30
[email protected]

Please note that the 011 exit code must be dialed first for all international calls made from the USA, Canada and Australia.

Related News

Layer2 now connects 100+ commonly used IT systems with Twitter via its Layer2 Cloud Connector

The Layer2 Cloud Connector is now able to connect Twitter to integrate data to a wide range of IT backend systems including Office 365, SharePoint, SQL, ERP/CRM.

New Microsoft Teams Connectors: Layer2 adds 100+ typically used backend systems

​The Layer2 Cloud Connector is now able to connect to Microsoft Teams to quickly integrate more than 100 IT backend systems including local SQL, ERP/CRM.
Related Downloads
PDF Image

Cloud Connector Instruction

Download this step-by-step instruction to connect and sync your corporate or cloud data sources bi-directional to any native SharePoint 2010/2013/2016 list or library, including Microsoft Office 365.
PDF Image

Feasibility Study: Connecting local SQL Server to SharePoint Online

The study compares different approaches for SharePoint Online data integration regarding performance, features, security and investment.
PDF Image

Flyer: Layer2 Partner Program

Partner with us as a software distributer, reseller or SharePoint, Office 365 or Azure service provider. We are offering a free Partner Program with up to 30% Discount, free NFR licenses etc. Please download for more.
PDF Image

Layer2 Case Study: Cloud Connector helps ChemWerth to integrate the Microsoft Office 365 Cloud

"The Cloud Connector’s interface is easy to understand and use. Anyone familiar with utilities in the Microsoft stack will be productive immediately. Our recommendation: The Layer2 Cloud Connector is a no brainer.”
NoDoc Image

Layer2 Cloud Connector PAD File

This XML-based PAD file offers a Layer2 Cloud Connector product description for resellers to download and publish.
PDF Image

Office 365: How to sync with MS Dynamics CRM

You can sync any CRM data with native lists in SharePoint on-prem or online to make it available offline with Outlook.
PDF Image

Office 365: How to sync with SAP?

You can connect SharePoint and Office 365 with SAP via NetWeaver and OData.
PDF Image

Office 365: How to sync your local file share?

When you are moving to the cloud, there are a lot of reasons to keep your local file system. But you don't have to miss the benefits of the cloud.
PDF Image

Product Flyer: Cloud Connector for Microsoft SharePoint & Office 365

Flyer with features, benefits & pricing info for download as PDF.
PDF Image

Product Flyer: SharePoint Online Local File Server Sync

You can centrally migrate, synchronize, or backup your local file server department shares and home drives very flexible with SharePoint Online to close known gaps and overcome limitations of the Microsoft OneDrive for Business client.
PDF Image

Solutions Flyer: Data Integration with SharePoint, Office 365 and 100+

FileMaker can be integrated with 100+ other sources codeless using the Layer2 Cloud Connector.
Related Links

Layer2 Cloud Connector Community Group @ LinkedIn

​Are you already @ LinkedIn? Please join the Cloud Connector Community Group to share your experience.

Microsoft Partner Story Book for Office 365 about Cloud Connector

​Know more about a Layer2 Cloud Connector customer reference at the Microsoft Office web site.

Purchase Layer2 Cloud Connector via ComponentSource

​ComponentSource has offices in the USA, UK and Japan supporting over 125,000+ Customers, in over 180 Countries. They are also an approved Federal Government supplier through the GSA Schedule.

 

cs-award-top-100-publisher-2014-15-large.gif

Sign Up for Layer2 Product Newsletter

We keep you up-to-date about new Layer2 product releases, added features and fixed issues.