Plugin Directory

Changeset 1240678

Timestamp:
09/08/2015 01:56:13 PM (9 years ago)
Author:
japh
Message:

Update to commit d81f86f from git@…:Japh/stream-to-papertrail.git

Location:
stream-to-papertrail
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • stream-to-papertrail/trunk/inc/class-stream-papertrail-api.php

    r1239660 r1240678  
    3434                    'title'       => esc_html__( 'Destination', 'stream-papertrail' ),
    3535                    'type'        => 'text',
    36                     'desc'        => esc_html__( 'You can check your destination on the "Account" page of your Papertrail dashboard, under "Log Destinations". It should be in the following format: logs1.papertrailapp.com:12345', 'stream-papertrail' ),
     36                    'desc'        => ' ),
    3737                    'default'     => '',
    38                 ),
    39                 array(
    40                     'name'        => 'program',
    41                     'title'       => esc_html__( 'Program', 'stream-papertrail' ),
    42                     'type'        => 'text',
    43                     'desc'        => esc_html__( '', 'stream-papertrail' ),
    44                     'default'     => 'wordpress',
    45                 ),
    46                 array(
    47                     'name'        => 'component',
    48                     'title'       => esc_html__( 'Component', 'stream-papertrail' ),
    49                     'type'        => 'text',
    50                     'desc'        => esc_html__( '', 'stream-papertrail' ),
    51                     'default'     => 'stream',
    5238                ),
    5339                array(
     
    8066        }
    8167
    82         $this->send_remote_syslog( json_encode( $record ) );
     68        $this->send_remote_syslog( );
    8369
    8470    }
     
    9076
    9177        $destination = array_combine( array( 'hostname', 'port' ), explode( ':', $this->options['papertrail_destination'] ) );
    92         $program     = $this->options['papertrail_program'];
    93         $component   = $this->options['papertrail_component'];
     78
     79        $program     = parse_url( is_multisite() ? network_site_url() : site_url(), PHP_URL_HOST );
     80        $component   = sanitize_title( 'stream-' . $message['connector'] );
     81
     82        $message = json_encode( $message );
    9483
    9584        $syslog_message = '<22>' . date( 'M d H:i:s ' ) . $program . ' ' . $component . ': ' . $this->format( $message );
     
    158147
    159148        $class = 'error';
    160         $message = 'The "Stream to Papertrail" plugin requires that you set a Destination in your <a href="' . admin_url( 'admin.php?page=wp_stream_settings' ) . '">Stream Settings</a> before it can log to Papertrail.';
     149        $message = 'T.';
    161150        echo '<div class="' . $class . '"><p>' . $message . '</p></div>';
    162151
  • stream-to-papertrail/trunk/readme.md

    r1239717 r1240678  
    99**Requires at least:** 4.3 
    1010**Tested up to:** 4.3 
    11 **Stable tag:** 0.0.4 
     11**Stable tag:** 0.0. 
    1212**License:** [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) 
    1313
     
    24243. Set the Destination for Papertrail on your Stream settings screen.
    2525
     26
     27
     28
     29
     30
     31
    2632## Changelog ##
     33
     34
     35
     36
     37
     38
    2739
    2840### 0.0.4 - September 7, 2015 ###
  • stream-to-papertrail/trunk/readme.txt

    r1239717 r1240678  
    44Requires at least:  4.3
    55Tested up to:       4.3
    6 Stable tag:         0.0.4
     6Stable tag:         0.0.
    77License:            GPLv2 or later
    88License URI:        https://www.gnu.org/licenses/gpl-2.0.html
     
    22223. Set the Destination for Papertrail on your Stream settings screen.
    2323
     24
     25
     26
     27
    2428== Changelog ==
     29
     30
     31
     32
     33
     34
     35
    2536
    2637= 0.0.4 - September 7, 2015 =
  • stream-to-papertrail/trunk/stream-papertrail.php

    r1239660 r1240678  
    55 * Description: Send Stream logs to Papertrail for safe-keeping.
    66 * Author: Japh
    7  * Version: 0.0.4
     7 * Version: 0.0.
    88 * Author URI: http://japh.com.au/
    99 */
Note: See TracChangeset for help on using the changeset viewer.