CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of log
XML
<system.diagnostics>
      <sources>
        <source name="TraceSourceApp"
          switchName="sourceSwitch"
          switchType="System.Diagnostics.SourceSwitch">
          <listeners>
            <add name="console"
              type="System.Diagnostics.ConsoleTraceListener">
              <filter type="System.Diagnostics.EventTypeFilter"
                initializeData="Warning"/>
by bnaya   November 03, 2011 @ 12:25am
36 Views
no comments
 
C#
private static TraceSource mySource =
            new TraceSource("TraceSourceApp");
static void Main(string[] args)
{
    mySource.TraceEvent(TraceEventType.Error, 1, "Error message.");
 
    // Change the event type for which tracing occurs.
    // The console trace listener must be specified 
    // in the configuration file. First, save the original
    // settings from the configuration file.
by bnaya   November 03, 2011 @ 12:24am
51 Views
no comments
 
C#
//using System.Web.Security
FormsAuthentication.SignOut();
by Egli   July 19, 2011 @ 7:35pm
89 Views
no comments
 
C#
//using System.Web.Security
 
if (Membership.ValidateUser(username, password))
{
   //Log in user.
   FormsAuthentication.SetAuthCookie(username, true);
}
else
{
   //Handle user not exist code.
by Egli   July 19, 2011 @ 6:32pm
90 Views
no comments
 
C#
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Media;
public partial class MyWPFClass : Window
{
public MyWPFClass()
{
InitializeComponent();
PrintLogicalTree(0, this);
by Vijay Sharma   April 22, 2011 @ 2:14am
155 Views
no comments
 
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="ViewLog.aspx.cs" Inherits="Module_Admin_ViewLog"
    ValidateRequest="false" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentHeader" Runat="Server">
<style type="text/css">
    .lastUpdate
    {
        height: .8em;
        font-size: .8em;
    }
by Ken Wiebke   March 19, 2011 @ 6:34am
183 Views
no comments
 
C#
#region REST_api
 
[System.Web.Services.WebMethod]
public static IList<string> GetLogTail(string logname, string numrows)
{
    int lineCnt = 1;
    List<string> lines = new List<string>();
    int maxLines;
 
    if (!int.TryParse(numrows, out maxLines))
by Ken Wiebke   March 19, 2011 @ 6:28am
Tags: log tail
94 Views
no comments
 
layout="${longdate} ${logger} ${level} ${message} ${exception:format=Type,Message,StackTrace:separator=[br]}"
by bnaya   March 17, 2011 @ 12:27am
Tags: NLog, Logging
314 Views
no comments
 
C#
       public MainWindow()
       {
           InitializeGeneralErrorHandling();
           InitializeComponent();
 
       }    
 
 
 
        private void InitializeGeneralErrorHandling()
by Felienne   February 09, 2011 @ 6:37am
Tags: logging, PJ, Robeco
126 Views
no comments
 
C#
private static readonly log4net.ILog _logger
            = log4net.LogManager.GetLogger(
                    System.Reflection.MethodBase.GetCurrentMethod()
                     .DeclaringType);
by Athens Springer   October 22, 2010 @ 8:03pm
183 Views
no comments
 
<p><a href="http://www.freeflashtoys.com/?stick-figure-family"><img src="<br />
<b>Warning</b>:  file_put_contents(/var/www/vhosts/pyzamstuff.com/httpdocs/family_images/d/da/8dbdc68a682a222c4305719ff611ef.png) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: No space left on device in <b>/usr/local/home/vhosts/pyzamstuff.com/httpdocs/savefamily.php</b> on line <b>19</b><br />
http://www.pyzamstuff.com/family_images/d/da/8dbdc68a682a222c4305719ff611ef.png" border="0" alt="Stick Figure Family at FreeFlashToys.com" /></a><br/>
Make your <a href="http://www.freeflashtoys.com/?stick-figure-family">Stick Figure Family</a> at <a href="http://www.freeflashtoys.com">FreeFlashToys.com</a><img style="visibility:hidden;width:0px;height:0px;" border="0" width="0" height="0" src="http://stuff.pyzam.com/misc/CXNID=1000015.10NXC.gif" /></p>
by Karen Hazzard   October 22, 2010 @ 5:10am
116 Views
1 comments
 
SQL
use DATABASE
dbcc shrinkfile(DATABASE_Log, 1);
by knight0323   September 02, 2010 @ 12:26pm
Tags: sql, log
224 Views
no comments
 
C#
public class SqlAppender : AppenderSkeleton
{
    private static readonly string CommandText = "INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)";
 
    public string ConnectionString { get; set; }
 
    protected override void Append(LoggingEvent loggingEvent)
    {
        using (var conn = new SqlConnection(ConnectionString))
        using (var cmd = new SqlCommand(CommandText, conn))
by Jon Sagara   April 25, 2010 @ 1:14am
270 Views
no comments
 
XML
NA
by tarasn   January 10, 2010 @ 11:36pm
255 Views
no comments
 
C#
/// <summary> 
/// Summary description for CustomCatalogZone 
/// </summary> 
public class CustomCatalogZone : CatalogZone 
{ 
// Fields 
private ITemplate _zoneTemplate; 
 
protected override CatalogPartChrome CreateCatalogPartChrome () 
{ 
by Athens Springer   October 29, 2009 @ 7:35am
149 Views
no comments
 
C#
/// <summary>
 /// A replacement for the declarative catalog part meant for limiting the webparts on a page to a single instance by hiding the webparts that already exist on the page.
 /// </summary>
 [Designer ( "System.Web.UI.Design.WebControls.WebParts.DeclarativeCatalogPartDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ), AspNetHostingPermission ( SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal ), AspNetHostingPermission ( SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal )]
 public class CustomCatalog : CatalogPart
 {
  // Fields
  private WebPartDescriptionCollection _descriptions;
  private string _webPartsListUserControlPath;
  private ITemplate _webPartsTemplate;
by Athens Springer   October 29, 2009 @ 7:34am
362 Views
no comments
 
[system.diagnostics.eventlog]::Delete("MyCustomLog")
by Markus   October 26, 2009 @ 6:15am
202 Views
no comments
 
C#
try {
    SaveFileDialog saveDialog = new SaveFileDialog
    {
        Filter = "Xml Files (*.xml)|*.xml",
        DefaultExt = ".xml",
    };
    if ((bool)saveDialog.ShowDialog()) {
        using (Stream fileStream = saveDialog.OpenFile()) {
           ...
        }
by Danijel Stulic   September 14, 2009 @ 4:19am
658 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate